diff options
Diffstat (limited to 'deps/v8/test/unittests/heap/cppgc/tests.cc')
-rw-r--r-- | deps/v8/test/unittests/heap/cppgc/tests.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/deps/v8/test/unittests/heap/cppgc/tests.cc b/deps/v8/test/unittests/heap/cppgc/tests.cc index e67ac730d6f..8d94369e40c 100644 --- a/deps/v8/test/unittests/heap/cppgc/tests.cc +++ b/deps/v8/test/unittests/heap/cppgc/tests.cc @@ -4,7 +4,10 @@ #include "test/unittests/heap/cppgc/tests.h" +#include <memory> + namespace cppgc { +namespace internal { namespace testing { // static @@ -12,7 +15,7 @@ std::unique_ptr<cppgc::PageAllocator> TestWithPlatform::page_allocator_; // static void TestWithPlatform::SetUpTestSuite() { - page_allocator_.reset(new v8::base::PageAllocator()); + page_allocator_ = std::make_unique<v8::base::PageAllocator>(); cppgc::InitializePlatform(page_allocator_.get()); } @@ -22,15 +25,11 @@ void TestWithPlatform::TearDownTestSuite() { page_allocator_.reset(); } -void TestWithHeap::SetUp() { - heap_ = Heap::Create(); - TestWithPlatform::SetUp(); -} +TestWithHeap::TestWithHeap() : heap_(Heap::Create()) {} -void TestWithHeap::TearDown() { - heap_.reset(); - TestWithPlatform::TearDown(); -} +TestSupportingAllocationOnly::TestSupportingAllocationOnly() + : no_gc_scope_(internal::Heap::From(GetHeap())) {} } // namespace testing +} // namespace internal } // namespace cppgc |