176 |
176 |
177 UcxMapIterator i = ucx_map_iterator(map); |
177 UcxMapIterator i = ucx_map_iterator(map); |
178 int check = 0; |
178 int check = 0; |
179 int hit = 0; |
179 int hit = 0; |
180 |
180 |
181 int* v; |
181 void* v; |
182 UCX_MAP_FOREACH(key, v, i) { |
182 UCX_MAP_FOREACH(key, v, i) { |
183 check += *v; |
183 check += *((int*)v); |
184 hit++; |
184 hit++; |
185 } |
185 } |
186 |
186 |
187 UCX_TEST_ASSERT(hit == 4, "test1: wrong number of hits"); |
187 UCX_TEST_ASSERT(hit == 4, "test1: wrong number of hits"); |
188 UCX_TEST_ASSERT(check == v1+v2+v3+v4, "test1: wrong result"); |
188 UCX_TEST_ASSERT(check == v1+v2+v3+v4, "test1: wrong result"); |