aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/prefix-map/driver.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/prefix-map/driver.cxx b/tests/prefix-map/driver.cxx
index 2fb8a99..70afc30 100644
--- a/tests/prefix-map/driver.cxx
+++ b/tests/prefix-map/driver.cxx
@@ -201,4 +201,16 @@ main ()
assert (i != e && i->second == 7);
}
}
+
+ {
+ // Test the special empty prefix logic.
+ //
+ pm m ({{"", 1}});
+
+ auto e (m.end ());
+
+ assert (m.find_sup ("") != e);
+ assert (m.find_sup ("foo") != e);
+ assert (m.find_sup ("foo.bar") != e);
+ }
}