Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: tests/MemoryTest.cpp

Issue 24251008: Add sk_calloc. Remove SkMemory_stdlib, which seems unused. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: use sk_out_of_memory Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ports/SkMemory_mozalloc.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "Test.h"
2 #include "TestClassDef.h"
3
4 DEF_TEST(memory_calloc, reporter) {
5 const size_t kNum = 200;
6 char* zeros = (char*)sk_calloc_throw(kNum*sizeof(char));
7
8 for (size_t i = 0; i < kNum; i++) {
9 REPORTER_ASSERT(reporter, 0 == zeros[i]);
10 }
11 sk_free(zeros);
12 }
OLDNEW
« no previous file with comments | « src/ports/SkMemory_mozalloc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698