Index: tests/MemoryTest.cpp |
diff --git a/tests/MemoryTest.cpp b/tests/MemoryTest.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4c3216b83b9af1f803ac96827c097c1c9ef0bba1 |
--- /dev/null |
+++ b/tests/MemoryTest.cpp |
@@ -0,0 +1,12 @@ |
+#include "Test.h" |
+#include "TestClassDef.h" |
+ |
+DEF_TEST(memory_calloc, reporter) { |
+ const size_t kNum = 200; |
+ char* zeros = (char*)sk_calloc_throw(kNum*sizeof(char)); |
+ |
+ for (size_t i = 0; i < kNum; i++) { |
+ REPORTER_ASSERT(reporter, 0 == zeros[i]); |
+ } |
+ sk_free(zeros); |
+} |