summaryrefslogtreecommitdiff
path: root/unittests/ADT/IntervalMapTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/IntervalMapTest.cpp')
-rw-r--r--unittests/ADT/IntervalMapTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/ADT/IntervalMapTest.cpp b/unittests/ADT/IntervalMapTest.cpp
index c7def84340..d4b2f52b50 100644
--- a/unittests/ADT/IntervalMapTest.cpp
+++ b/unittests/ADT/IntervalMapTest.cpp
@@ -315,6 +315,11 @@ TEST(IntervalMapTest, RootMultiCoalescing) {
EXPECT_EQ(320u, I.stop());
++I;
EXPECT_FALSE(I.valid());
+
+ // Test clear() on non-branched map.
+ map.clear();
+ EXPECT_TRUE(map.empty());
+ EXPECT_TRUE(map.begin() == map.end());
}
// Branched, non-coalescing tests.
@@ -362,6 +367,10 @@ TEST(IntervalMapTest, Branched) {
}
EXPECT_TRUE(I == map.begin());
+ // Test clear() on branched map.
+ map.clear();
+ EXPECT_TRUE(map.empty());
+ EXPECT_TRUE(map.begin() == map.end());
}
} // namespace