Flutter Engine
The Flutter Engine
Functions
MemoryTest.cpp File Reference
#include "include/private/base/SkMalloc.h"
#include "tests/Test.h"
#include <cstddef>

Go to the source code of this file.

Functions

 DEF_TEST (memory_calloc, reporter)
 

Function Documentation

◆ DEF_TEST()

DEF_TEST ( memory_calloc  ,
reporter   
)

Definition at line 12 of file MemoryTest.cpp.

12 {
13 const size_t kNum = 200;
14 char* zeros = (char*)sk_calloc_throw(kNum*sizeof(char));
15
16 for (size_t i = 0; i < kNum; i++) {
17 REPORTER_ASSERT(reporter, 0 == zeros[i]);
18 }
19 sk_free(zeros);
20}
reporter
Definition: FontMgrTest.cpp:39
static void * sk_calloc_throw(size_t size)
Definition: SkMalloc.h:71
SK_API void sk_free(void *)
#define REPORTER_ASSERT(r, cond,...)
Definition: Test.h:286