summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-03-01 22:10:16 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-03-01 22:10:16 +0000
commit97e910ecff5ed8b653a07fb1d014dab772931c0b (patch)
tree613e515bf78755771a49ce3602727573bccd7938 /unittests
parentb4d023503b40b45fd11835f1697a17e23f958af3 (diff)
downloadllvm-97e910ecff5ed8b653a07fb1d014dab772931c0b.tar.gz
llvm-97e910ecff5ed8b653a07fb1d014dab772931c0b.tar.bz2
llvm-97e910ecff5ed8b653a07fb1d014dab772931c0b.tar.xz
BumpPtrAllocator: Make sure threshold cannot be initialized with a value smaller than the slab size.
This replaces r151834 with a simpler fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/AllocatorTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/Support/AllocatorTest.cpp b/unittests/Support/AllocatorTest.cpp
index bc5bd3dc40..8b463c11df 100644
--- a/unittests/Support/AllocatorTest.cpp
+++ b/unittests/Support/AllocatorTest.cpp
@@ -98,7 +98,7 @@ TEST(AllocatorTest, TestSmallSlabSize) {
BumpPtrAllocator Alloc(128);
Alloc.Allocate(200, 0);
- EXPECT_EQ(1U, Alloc.GetNumSlabs());
+ EXPECT_EQ(2U, Alloc.GetNumSlabs());
}
// Mock slab allocator that returns slabs aligned on 4096 bytes. There is no