summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/include/test_memory_chunk.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/include/test_memory_chunk.cpp b/tests/include/test_memory_chunk.cpp
index 4920424..eefc357 100644
--- a/tests/include/test_memory_chunk.cpp
+++ b/tests/include/test_memory_chunk.cpp
@@ -58,14 +58,10 @@ int main(int argc, char * argv[]){
assert(chunk->get_content(sizeof(int), &tmp, sizeof(int)));
printf("%d\n", tmp);
- //clean up chunk
- delete chunk;
-
const char * filename = "/tmp/version";
const char * version = "0.2.0";
- //testing version check.
- chunk = new MemoryChunk;
+ /* testing version check. */
bool retval = chunk->load(filename);
if ( !retval ){
fprintf(stderr, "can't find chunk\n");
@@ -83,5 +79,7 @@ int main(int argc, char * argv[]){
printf("match\n");
}
+ delete chunk;
+
return 0;
}