Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
9#include "tests/Test.h"
10#include <cstddef>
11
12DEF_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
static void * sk_calloc_throw(size_t size)
Definition SkMalloc.h:71
SK_API void sk_free(void *)
#define DEF_TEST(name, reporter)
Definition Test.h:312
#define REPORTER_ASSERT(r, cond,...)
Definition Test.h:286