tests/test_map.cpp

changeset 659
4a06fd63909a
parent 658
56c62780582e
child 668
d7129285ac32
--- a/tests/test_map.cpp	Thu Feb 23 18:58:15 2023 +0100
+++ b/tests/test_map.cpp	Thu Feb 23 21:42:46 2023 +0100
@@ -163,7 +163,7 @@
         } else {
             // execute a remove and verify that the removed element was returned (or nullptr)
             auto found = refmap.find(op.key);
-            auto removed = cxMapRemove(map, key);
+            auto removed = cxMapRemoveAndGet(map, key);
             if (found == refmap.end()) {
                 EXPECT_EQ(removed, nullptr);
             } else {
@@ -307,8 +307,7 @@
     EXPECT_NE(s3p, &s3);
 
     // remove a string
-    auto r = cxMapRemove(map, cx_hash_key_str("s2"));
-    EXPECT_EQ(r, nullptr);
+    cxMapRemove(map, cx_hash_key_str("s2"));
 
     // iterate
     auto ref = std::vector{s5.ptr, s3.ptr, s4.ptr};

mercurial