diff options
author | Peng Wu <alexepico@gmail.com> | 2013-04-10 14:02:03 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-04-10 14:02:03 +0800 |
commit | b94e131e6fadf4b83916251e187e30d4433ca1bf (patch) | |
tree | c3bd2b0056ec29490a2fab0a61cc27a25bca49e9 /tests | |
parent | 8888185c907779dc9aa20b0b2e7bd19af6d11d2c (diff) | |
download | libpinyin-b94e131e6fadf4b83916251e187e30d4433ca1bf.tar.gz libpinyin-b94e131e6fadf4b83916251e187e30d4433ca1bf.tar.xz libpinyin-b94e131e6fadf4b83916251e187e30d4433ca1bf.zip |
clean up test_memory_chunk.cpp
Diffstat (limited to 'tests')
-rw-r--r-- | tests/include/test_memory_chunk.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/include/test_memory_chunk.cpp b/tests/include/test_memory_chunk.cpp index dcee8a1..9779c8f 100644 --- a/tests/include/test_memory_chunk.cpp +++ b/tests/include/test_memory_chunk.cpp @@ -58,30 +58,6 @@ int main(int argc, char * argv[]){ assert(chunk->get_content(sizeof(int), &tmp, sizeof(int))); printf("%d\n", tmp); - const char * filename = "/tmp/version"; - const char * version = "0.2.0"; - - /* testing version check. */ - bool retval = chunk->load(filename); - if ( !retval ){ - fprintf(stderr, "can't find chunk\n"); - }else if ( memcmp(version, chunk->begin(), strlen(version) + 1) == 0){ - printf("match\n"); - } - - delete chunk; - chunk = new MemoryChunk; - - chunk->set_content(0, version, strlen(version) + 1); - chunk->save(filename); - - retval = chunk->load(filename); - if ( !retval ){ - fprintf(stderr, "can't find chunk\n"); - } else if ( memcmp(version, chunk->begin(), strlen(version) + 1) == 0){ - printf("match\n"); - } - delete chunk; return 0; |