test/test_map.cpp

changeset 630
ac5e7f789048
parent 604
056e5f592d84
     1.1 --- a/test/test_map.cpp	Wed Nov 23 22:40:55 2022 +0100
     1.2 +++ b/test/test_map.cpp	Sat Nov 26 16:58:41 2022 +0100
     1.3 @@ -183,9 +183,9 @@
     1.4      cxMapPut(map, cx_hash_key_str("key 5"), (void *) "val 5");
     1.5      cxMapPut(map, cx_hash_key_str("key 6"), (void *) "val 6");
     1.6  
     1.7 -    auto iter = cxMapIterator(map);
     1.8 +    auto iter = cxMapMutIterator(map);
     1.9      cx_foreach(CxMapEntry*, entry, iter) {
    1.10 -        if (entry->key->data.cstr[4] % 2 == 1) iter.remove = true;
    1.11 +        if (entry->key->data.cstr[4] % 2 == 1) cxIteratorFlagRemoval(iter);
    1.12      }
    1.13      EXPECT_EQ(map->size, 3);
    1.14      EXPECT_EQ(iter.index, map->size);

mercurial