summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-10-26 10:03:27 +0800
committerPeng Wu <alexepico@gmail.com>2016-10-26 10:03:27 +0800
commit0853688a1f28012b3e9a0ac868a606de6ff3c998 (patch)
treef8f011271b9e6466f4d7776737b7a9f2ae77c346 /tests
parent23ab5e13c66a70769c4c0000c3667318ba33c420 (diff)
downloadlibpinyin-0853688a1f28012b3e9a0ac868a606de6ff3c998.tar.gz
update test_memory_chunk.cpp
Diffstat (limited to 'tests')
-rw-r--r--tests/include/test_memory_chunk.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/include/test_memory_chunk.cpp b/tests/include/test_memory_chunk.cpp
index 9779c8f..5042882 100644
--- a/tests/include/test_memory_chunk.cpp
+++ b/tests/include/test_memory_chunk.cpp
@@ -58,6 +58,12 @@ int main(int argc, char * argv[]){
assert(chunk->get_content(sizeof(int), &tmp, sizeof(int)));
printf("%d\n", tmp);
+ assert(chunk->save("/tmp/test.bin"));
+ assert(chunk->load("/tmp/test.bin"));
+#ifdef LIBPINYIN_USE_MMAP
+ assert(chunk->mmap("/tmp/test.bin"));
+#endif
+
delete chunk;
return 0;