summaryrefslogtreecommitdiff
path: root/unittests/ADT/SmallBitVectorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/SmallBitVectorTest.cpp')
-rw-r--r--unittests/ADT/SmallBitVectorTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/ADT/SmallBitVectorTest.cpp b/unittests/ADT/SmallBitVectorTest.cpp
index a2cc652ca1..a0c079d874 100644
--- a/unittests/ADT/SmallBitVectorTest.cpp
+++ b/unittests/ADT/SmallBitVectorTest.cpp
@@ -176,4 +176,12 @@ TEST(SmallBitVectorTest, CompoundAssignment) {
EXPECT_EQ(100U, A.size());
}
+TEST(SmallBitVectorTest, ProxyIndex) {
+ SmallBitVector Vec(3);
+ EXPECT_TRUE(Vec.none());
+ Vec[0] = Vec[1] = Vec[2] = true;
+ EXPECT_EQ(Vec.size(), Vec.count());
+ Vec[2] = Vec[1] = Vec[0] = false;
+ EXPECT_TRUE(Vec.none());
+}
}