Add basic test exposing many bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121995 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2010-12-16 19:46:09 +00:00
parent 8a28f21379
commit 460ee0fd19
2 changed files with 21 additions and 6 deletions

View File

@@ -550,4 +550,19 @@ TEST(IntervalMapTest, RandomCoalescing) {
}
TEST(IntervalMapOverlapsTest, EmptyMaps) {
typedef IntervalMapOverlaps<UUMap,UUMap> UUOverlaps;
UUMap::Allocator allocator;
UUMap mapA(allocator);
UUMap mapB(allocator);
// empty, empty.
EXPECT_FALSE(UUOverlaps(mapA, mapB).valid());
mapA.insert(1, 2, 3);
// full, empty
EXPECT_FALSE(UUOverlaps(mapA, mapB).valid());
// empty, full
EXPECT_FALSE(UUOverlaps(mapB, mapA).valid());
}
} // namespace