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"); |