summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/BitVectorTest.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-06-07 15:14:31 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-06-07 15:14:31 +0000
commit9675a0dbeca54f759e0c404101266a4a4bf55007 (patch)
tree4fdf2b0febbdfda70a58ebe7f2137db4cca3b932 /llvm/unittests/ADT/BitVectorTest.cpp
parent6af3fce55eddad978965bf1d5280d9b6cadfd685 (diff)
downloadbcm5719-llvm-9675a0dbeca54f759e0c404101266a4a4bf55007.tar.gz
bcm5719-llvm-9675a0dbeca54f759e0c404101266a4a4bf55007.zip
BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.
llvm-svn: 183525
Diffstat (limited to 'llvm/unittests/ADT/BitVectorTest.cpp')
-rw-r--r--llvm/unittests/ADT/BitVectorTest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/BitVectorTest.cpp b/llvm/unittests/ADT/BitVectorTest.cpp
index f97be22fd27..85e15949100 100644
--- a/llvm/unittests/ADT/BitVectorTest.cpp
+++ b/llvm/unittests/ADT/BitVectorTest.cpp
@@ -149,6 +149,22 @@ TYPED_TEST(BitVectorTest, TrivialOperation) {
EXPECT_FALSE(Vec.none());
EXPECT_FALSE(Vec.empty());
+ Vec.resize(64);
+ EXPECT_EQ(64U, Vec.count());
+ EXPECT_EQ(64U, Vec.size());
+ EXPECT_TRUE(Vec.any());
+ EXPECT_TRUE(Vec.all());
+ EXPECT_FALSE(Vec.none());
+ EXPECT_FALSE(Vec.empty());
+
+ Vec.flip();
+ EXPECT_EQ(0U, Vec.count());
+ EXPECT_EQ(64U, Vec.size());
+ EXPECT_FALSE(Vec.any());
+ EXPECT_FALSE(Vec.all());
+ EXPECT_TRUE(Vec.none());
+ EXPECT_FALSE(Vec.empty());
+
Inv = TypeParam().flip();
EXPECT_EQ(0U, Inv.count());
EXPECT_EQ(0U, Inv.size());
OpenPOWER on IntegriCloud