summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-04-30 13:40:27 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-04-30 13:40:27 +0000
commit6340722d1751841a00e791a44d8f2f5e481b8c61 (patch)
tree51e405f2c764ddff80415733d74e5d0d6d34aedf /unittests
parentb252fbd179c494b3c6220f6f7e42f3ff5d15bda6 (diff)
downloadllvm-6340722d1751841a00e791a44d8f2f5e481b8c61.tar.gz
llvm-6340722d1751841a00e791a44d8f2f5e481b8c61.tar.bz2
llvm-6340722d1751841a00e791a44d8f2f5e481b8c61.tar.xz
SmallBitVector: Rework find_first/find_next and tweak test to test them (at least on 64 bit platforms).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/SmallBitVectorTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/unittests/ADT/SmallBitVectorTest.cpp b/unittests/ADT/SmallBitVectorTest.cpp
index a0c079d874..e12abfe20d 100644
--- a/unittests/ADT/SmallBitVectorTest.cpp
+++ b/unittests/ADT/SmallBitVectorTest.cpp
@@ -55,7 +55,7 @@ TEST(SmallBitVectorTest, TrivialOperation) {
Vec.resize(26, true);
Vec.resize(29, false);
Vec.resize(33, true);
- Vec.resize(61, false);
+ Vec.resize(57, false);
unsigned Count = 0;
for (unsigned i = Vec.find_first(); i != -1u; i = Vec.find_next(i)) {
++Count;
@@ -66,7 +66,8 @@ TEST(SmallBitVectorTest, TrivialOperation) {
EXPECT_EQ(Count, 23u);
EXPECT_FALSE(Vec[0]);
EXPECT_TRUE(Vec[32]);
- EXPECT_FALSE(Vec[60]);
+ EXPECT_FALSE(Vec[56]);
+ Vec.resize(61, false);
SmallBitVector Copy = Vec;
SmallBitVector Alt(3, false);