diff options
Diffstat (limited to 'unittests/ADT/IntervalMapTest.cpp')
-rw-r--r-- | unittests/ADT/IntervalMapTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unittests/ADT/IntervalMapTest.cpp b/unittests/ADT/IntervalMapTest.cpp index e0d95a1408..eb1f1a4b03 100644 --- a/unittests/ADT/IntervalMapTest.cpp +++ b/unittests/ADT/IntervalMapTest.cpp @@ -586,7 +586,11 @@ TEST(IntervalMapOverlapsTest, SmallMaps) { ASSERT_TRUE(BA.valid()); EXPECT_EQ(3u, BA.a().start()); EXPECT_EQ(4u, BA.b().start()); - ++BA; + // advance past end. + BA.advanceTo(6); + EXPECT_FALSE(BA.valid()); + // advance an invalid iterator. + BA.advanceTo(7); EXPECT_FALSE(BA.valid()); } |