test/map_tests.c

changeset 327
fbc33813265b
parent 259
2f5dea574a75
child 374
be77fb2da242
equal deleted inserted replaced
326:3dd7d21fb76b 327:fbc33813265b
37 UCX_TEST_END 37 UCX_TEST_END
38 ucx_map_free(map); 38 ucx_map_free(map);
39 } 39 }
40 40
41 UCX_TEST(test_ucx_key) { 41 UCX_TEST(test_ucx_key) {
42 UcxKey key = ucx_key((void*)"This is a text.", 15); 42 UcxKey key = ucx_key("This is a text.", 15);
43 UCX_TEST_BEGIN 43 UCX_TEST_BEGIN
44 UCX_TEST_ASSERT(strncmp((const char*)key.data, "This is a text.", 15) == 0, 44 UCX_TEST_ASSERT(strncmp((const char*)key.data, "This is a text.", 15) == 0,
45 "failed"); 45 "failed");
46 UCX_TEST_ASSERT(key.len == 15, "failed"); 46 UCX_TEST_ASSERT(key.len == 15, "failed");
47 UCX_TEST_ASSERT(key.hash == 1261186027, "hash failed"); 47 UCX_TEST_ASSERT(key.hash == 1261186027, "hash failed");

mercurial