Flutter Engine
The Flutter Engine
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
DEF_TEST
DEF_TEST(memory_calloc, reporter)
Definition:
MemoryTest.cpp:12
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
REPORTER_ASSERT
#define REPORTER_ASSERT(r, cond,...)
Definition:
Test.h:286
i
int i
Definition:
fl_socket_accessible.cc:18
Generated on Sun Jun 23 2024 21:56:40 for Flutter Engine by
1.9.4