Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tests
MemoryTest.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2013 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#include "
include/private/base/SkMalloc.h
"
9
#include "
tests/Test.h
"
10
#include <cstddef>
11
12
DEF_TEST
(memory_calloc,
reporter
) {
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
reporter
Definition
FontMgrTest.cpp:39
SkMalloc.h
sk_calloc_throw
static void * sk_calloc_throw(size_t size)
Definition
SkMalloc.h:71
sk_free
SK_API void sk_free(void *)
Definition
SkMemory_malloc.cpp:83
Test.h
DEF_TEST
#define DEF_TEST(name, reporter)
Definition
Test.h:312
REPORTER_ASSERT
#define REPORTER_ASSERT(r, cond,...)
Definition
Test.h:286
Generated on Fri Apr 26 2024 06:17:47 for Flutter Engine by
1.9.8