From 5f3df104b5ac0c3497a48cfc476eb3eedf1e543b Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 6 Jun 2022 11:29:16 +0800 Subject: Use check_result macro in tests directory --- tests/include/test_memory_chunk.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/include/test_memory_chunk.cpp') diff --git a/tests/include/test_memory_chunk.cpp b/tests/include/test_memory_chunk.cpp index 5042882..f496e4d 100644 --- a/tests/include/test_memory_chunk.cpp +++ b/tests/include/test_memory_chunk.cpp @@ -55,13 +55,13 @@ int main(int argc, char * argv[]){ printf("%d\t%d\n", *p3, *(p3+1)); int tmp; - assert(chunk->get_content(sizeof(int), &tmp, sizeof(int))); + check_result(chunk->get_content(sizeof(int), &tmp, sizeof(int))); printf("%d\n", tmp); - assert(chunk->save("/tmp/test.bin")); - assert(chunk->load("/tmp/test.bin")); + check_result(chunk->save("/tmp/test.bin")); + check_result(chunk->load("/tmp/test.bin")); #ifdef LIBPINYIN_USE_MMAP - assert(chunk->mmap("/tmp/test.bin")); + check_result(chunk->mmap("/tmp/test.bin")); #endif delete chunk; -- cgit