diff -r 6c81ee4f11ad -r ac5e7f789048 test/test_map.cpp --- a/test/test_map.cpp Wed Nov 23 22:40:55 2022 +0100 +++ b/test/test_map.cpp Sat Nov 26 16:58:41 2022 +0100 @@ -183,9 +183,9 @@ cxMapPut(map, cx_hash_key_str("key 5"), (void *) "val 5"); cxMapPut(map, cx_hash_key_str("key 6"), (void *) "val 6"); - auto iter = cxMapIterator(map); + auto iter = cxMapMutIterator(map); cx_foreach(CxMapEntry*, entry, iter) { - if (entry->key->data.cstr[4] % 2 == 1) iter.remove = true; + if (entry->key->data.cstr[4] % 2 == 1) cxIteratorFlagRemoval(iter); } EXPECT_EQ(map->size, 3); EXPECT_EQ(iter.index, map->size);