diff options
Diffstat (limited to 'tests/gtests/blenlib/BLI_map_test.cc')
-rw-r--r-- | tests/gtests/blenlib/BLI_map_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_map_test.cc b/tests/gtests/blenlib/BLI_map_test.cc index 623055d5032..96e9879abe7 100644 --- a/tests/gtests/blenlib/BLI_map_test.cc +++ b/tests/gtests/blenlib/BLI_map_test.cc @@ -449,6 +449,15 @@ TEST(map, PointerKeys) EXPECT_TRUE(map.is_empty()); } +TEST(map, ConstKeysAndValues) +{ + Map<const std::string, const std::string> map; + map.reserve(10); + map.add("45", "643"); + EXPECT_TRUE(map.contains("45")); + EXPECT_FALSE(map.contains("54")); +} + /** * Set this to 1 to activate the benchmark. It is disabled by default, because it prints a lot. */ |