test/map_tests.c

changeset 152
3238f65db163
parent 134
4d320dc3a7af
child 177
11ad03783baf
equal deleted inserted replaced
151:fc8d05972af7 152:3238f65db163
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");

mercurial