aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ADT
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-06-07 14:14:38 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-06-07 14:14:38 +0000
commit597253da97ec4fa5fa4a03c2230ed026b1b6aad6 (patch)
tree8856f89933a852b2be083527c227dec30c124c39 /unittests/ADT
parent041399aad5a3d93c2dc9d2b70cb9b87d4a987ece (diff)
downloadexternal_llvm-597253da97ec4fa5fa4a03c2230ed026b1b6aad6.zip
external_llvm-597253da97ec4fa5fa4a03c2230ed026b1b6aad6.tar.gz
external_llvm-597253da97ec4fa5fa4a03c2230ed026b1b6aad6.tar.bz2
Optimize BitVector::all().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ADT')
-rw-r--r--unittests/ADT/BitVectorTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/ADT/BitVectorTest.cpp b/unittests/ADT/BitVectorTest.cpp
index dc298a8..f97be22 100644
--- a/unittests/ADT/BitVectorTest.cpp
+++ b/unittests/ADT/BitVectorTest.cpp
@@ -141,6 +141,14 @@ TYPED_TEST(BitVectorTest, TrivialOperation) {
EXPECT_TRUE(Vec.none());
EXPECT_FALSE(Vec.empty());
+ Vec.flip();
+ EXPECT_EQ(130U, Vec.count());
+ EXPECT_EQ(130U, Vec.size());
+ EXPECT_TRUE(Vec.any());
+ EXPECT_TRUE(Vec.all());
+ EXPECT_FALSE(Vec.none());
+ EXPECT_FALSE(Vec.empty());
+
Inv = TypeParam().flip();
EXPECT_EQ(0U, Inv.count());
EXPECT_EQ(0U, Inv.size());