1.1 --- a/test/map_tests.c Thu Oct 04 16:03:18 2012 +0200 1.2 +++ b/test/map_tests.c Thu Oct 04 18:23:32 2012 +0200 1.3 @@ -150,9 +150,9 @@ 1.4 FILE *f = fopen("test_ucx_map_store", "w"); 1.5 int r; 1.6 1.7 - fwrite(" # comment test", 1, 15, f); 1.8 + fwrite(" # comment test\n", 1, 16, f); 1.9 r = ucx_map_store(map, f); 1.10 - fwrite("#discard this", 1, 13, f); 1.11 + fwrite("!discard this", 1, 13, f); 1.12 1.13 fclose(f); 1.14 ucx_map_free(map); 1.15 @@ -165,20 +165,26 @@ 1.16 UCX_TEST_ASSERT(r == 0, "IO errors, test cannot be performed"); 1.17 1.18 value = ucx_map_cstr_get(map, "test"); 1.19 + UCX_TEST_ASSERT(value != NULL, "value not found for key: test"); 1.20 UCX_TEST_ASSERT(strcmp(value, "test") == 0, "value error for key: test"); 1.21 1.22 value = ucx_map_cstr_get(map, "key"); 1.23 + UCX_TEST_ASSERT(value != NULL, "value not found for key: key"); 1.24 UCX_TEST_ASSERT(strcmp(value, "value") == 0, "value error for key: key"); 1.25 1.26 value = ucx_map_cstr_get(map, "other.very.long.key"); 1.27 + UCX_TEST_ASSERT(value != NULL, 1.28 + "value not found for key: other.very.long.key"); 1.29 UCX_TEST_ASSERT(strcmp(value, "value") == 0, 1.30 "value error for key: other.very.long.key"); 1.31 1.32 value = ucx_map_cstr_get(map, "testkey"); 1.33 + UCX_TEST_ASSERT(value != NULL, "value not found for key: testkey"); 1.34 UCX_TEST_ASSERT(strcmp(value, "testvalue") == 0, 1.35 "value error for key: testkey"); 1.36 1.37 value = ucx_map_cstr_get(map, "simple"); 1.38 + UCX_TEST_ASSERT(value != NULL, "value not found for key: simple"); 1.39 UCX_TEST_ASSERT(strcmp(value, "not a key but an extremely long value " 1.40 "to test if the buffer extension works as designed") == 0, 1.41 "value error for key: simple");