diff options
Diffstat (limited to 'src/common/memory_unittest.cc')
-rw-r--r-- | src/common/memory_unittest.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/memory_unittest.cc b/src/common/memory_unittest.cc index 69d9f8ab..1e511ca5 100644 --- a/src/common/memory_unittest.cc +++ b/src/common/memory_unittest.cc @@ -87,3 +87,11 @@ TEST(WastefulVectorTest, Simple) { for (unsigned i = 0; i < 256; ++i) ASSERT_EQ(v[i], i); } + +TEST(WastefulVectorTest, UsesPageAllocator) { + PageAllocator allocator_; + wasteful_vector<unsigned> v(&allocator_); + + v.push_back(1); + ASSERT_TRUE(allocator_.OwnsPointer(&v[0])); +} |