diff --git a/utest/DArenaHashMap.test.cpp b/utest/DArenaHashMap.test.cpp index 28da62c..0962def 100644 --- a/utest/DArenaHashMap.test.cpp +++ b/utest/DArenaHashMap.test.cpp @@ -274,6 +274,24 @@ namespace xo { REQUIRE(map[999] == 999); } + TEST_CASE("DArenaHashMap-string_view-key", "[arena][DArenaHashMap]") + { + using HashMap = DArenaHashMap; + + HashMap map(1024); + + map["hello"] = 42; + REQUIRE(map.size() == 1); + REQUIRE(map.verify_ok()); + + map["world"] = 100; + REQUIRE(map.size() == 2); + REQUIRE(map.verify_ok()); + + REQUIRE(map["hello"] == 42); + REQUIRE(map["world"] == 100); + } + // TODO: // - let's try getting lcov to work in xo-umbrella2 }