113 |
113 |
114 UCX_TEST_ASSERT(strncmp(mid, "the ", 4) == 0, "failed"); |
114 UCX_TEST_ASSERT(strncmp(mid, "the ", 4) == 0, "failed"); |
115 |
115 |
116 UCX_TEST_END |
116 UCX_TEST_END |
117 ucx_list_free(list); |
117 ucx_list_free(list); |
|
118 } |
|
119 |
|
120 UCX_TEST_IMPLEMENT(test_ucx_list_contains) { |
|
121 UcxList *l = ucx_list_append(NULL, (void*)"Contains "); |
|
122 UCX_TEST_BEGIN |
|
123 l = ucx_list_append(l, (void*)"a "); |
|
124 l = ucx_list_append(l, (void*)"string!"); |
|
125 |
|
126 UCX_TEST_ASSERT(ucx_list_contains(l,(void*)"a ",ucx_strcmp,NULL), "failed"); |
|
127 UCX_TEST_ASSERT(!ucx_list_contains(l,(void*)"a",ucx_strcmp,NULL), "failed"); |
|
128 |
|
129 UCX_TEST_END |
|
130 ucx_list_free(l); |
118 } |
131 } |
119 |
132 |
120 UCX_TEST_IMPLEMENT(test_ucx_list_remove) { |
133 UCX_TEST_IMPLEMENT(test_ucx_list_remove) { |
121 UcxList *list = ucx_list_append(NULL, (void*)"Hello"); |
134 UcxList *list = ucx_list_append(NULL, (void*)"Hello"); |
122 UCX_TEST_BEGIN |
135 UCX_TEST_BEGIN |