summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-03-29 07:11:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-03-29 07:11:21 +0000
commitef484a376cce3729b45ad86eab5724aa83a61823 (patch)
tree52a9bb3c778332c02329ceb9f04d7592d3e53080 /unittests
parent617330909f0c26a3f2ab8601a029b9bdca48aa61 (diff)
downloadllvm-ef484a376cce3729b45ad86eab5724aa83a61823.tar.gz
llvm-ef484a376cce3729b45ad86eab5724aa83a61823.tar.bz2
llvm-ef484a376cce3729b45ad86eab5724aa83a61823.tar.xz
Revert "Fix allocations of SmallVector and SmallPtrSet so they are more prone to"
This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61. It broke the bots: /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure Value of: v[i].getValue() Actual: 0 Expected: value Which is: 2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/SmallPtrSetTest.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/unittests/ADT/SmallPtrSetTest.cpp b/unittests/ADT/SmallPtrSetTest.cpp
index f85d7c941e..9114875e00 100644
--- a/unittests/ADT/SmallPtrSetTest.cpp
+++ b/unittests/ADT/SmallPtrSetTest.cpp
@@ -17,61 +17,6 @@
using namespace llvm;
// SmallPtrSet swapping test.
-TEST(SmallPtrSetTest, GrowthTest) {
- int i;
- int buf[8];
- for(i=0; i<8; ++i) buf[i]=0;
-
-
- SmallPtrSet<int *, 4> s;
- typedef SmallPtrSet<int *, 4>::iterator iter;
-
- s.insert(&buf[0]);
- s.insert(&buf[1]);
- s.insert(&buf[2]);
- s.insert(&buf[3]);
- EXPECT_EQ(4U, s.size());
-
- i = 0;
- for(iter I=s.begin(), E=s.end(); I!=E; ++I, ++i)
- (**I)++;
- EXPECT_EQ(4, i);
- for(i=0; i<8; ++i)
- EXPECT_EQ(i<4?1:0,buf[i]);
-
- s.insert(&buf[4]);
- s.insert(&buf[5]);
- s.insert(&buf[6]);
- s.insert(&buf[7]);
-
- i = 0;
- for(iter I=s.begin(), E=s.end(); I!=E; ++I, ++i)
- (**I)++;
- EXPECT_EQ(8, i);
- s.erase(&buf[4]);
- s.erase(&buf[5]);
- s.erase(&buf[6]);
- s.erase(&buf[7]);
- EXPECT_EQ(4U, s.size());
-
- i = 0;
- for(iter I=s.begin(), E=s.end(); I!=E; ++I, ++i)
- (**I)++;
- EXPECT_EQ(4, i);
- for(i=0; i<8; ++i)
- EXPECT_EQ(i<4?3:1,buf[i]);
-
- s.clear();
- for(i=0; i<8; ++i) buf[i]=0;
- for(i=0; i<128; ++i) s.insert(&buf[i%8]); // test repeated entires
- EXPECT_EQ(8U, s.size());
- for(iter I=s.begin(), E=s.end(); I!=E; ++I, ++i)
- (**I)++;
- for(i=0; i<8; ++i)
- EXPECT_EQ(1,buf[i]);
-}
-
-
TEST(SmallPtrSetTest, SwapTest) {
int buf[10];