aboutsummaryrefslogtreecommitdiff
path: root/tests/build/prefix-map
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-24 06:27:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-24 06:27:57 +0200
commit52925684387496e83425c79f74b29a91943466a7 (patch)
tree02ba612b339e73625be28ab141fe11e358866404 /tests/build/prefix-map
parent5fc53bd74c7635a292cef041180da4cd32b7fb12 (diff)
Make empty key to always be prefix in prefix_map
Diffstat (limited to 'tests/build/prefix-map')
-rw-r--r--tests/build/prefix-map/driver.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/build/prefix-map/driver.cxx b/tests/build/prefix-map/driver.cxx
index fb5269c..77edb6c 100644
--- a/tests/build/prefix-map/driver.cxx
+++ b/tests/build/prefix-map/driver.cxx
@@ -35,7 +35,8 @@ main ()
{
auto r (m.find (""));
- assert (r.first == r.second);
+ assert (r.first != r.second && r.first->second == 1 &&
+ ++r.first == r.second);
}
{
@@ -70,7 +71,9 @@ main ()
{
auto r (m.find (""));
- assert (r.first == r.second);
+ assert (r.first != r.second && r.first->second == 2 &&
+ ++r.first != r.second && r.first->second == 1 &&
+ ++r.first == r.second);
}
{
@@ -114,11 +117,6 @@ main ()
'.');
{
- auto r (m.find (""));
- assert (r.first == r.second);
- }
-
- {
auto r (m.find ("fo"));
assert (r.first == r.second);
}