1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include "src/handles.h"
9 #include "src/heap/spaces.h"
11 // Tests that should have access to private methods of {v8::internal::Heap}.
12 // Those tests need to be defined using HEAP_TEST(Name) { ... }.
13 #define HEAP_TEST_METHODS(V) \
15 V(MarkCompactCollector) \
17 V(NumberStringCacheSize) \
23 V(TestSizeOfObjects) \
24 V(WriteBarriersInCopyJSObject)
27 #define HEAP_TEST(Name) \
28 CcTest register_test_##Name(v8::internal::HeapTester::Test##Name, __FILE__, \
29 #Name, NULL, true, true); \
30 void v8::internal::HeapTester::Test##Name()
33 #define THREADED_HEAP_TEST(Name) \
34 RegisterThreadedTest register_##Name(v8::internal::HeapTester::Test##Name, \
44 #define DECLARE_STATIC(Name) static void Test##Name();
46 HEAP_TEST_METHODS(DECLARE_STATIC)
47 #undef HEAP_TEST_METHODS
50 static AllocationResult AllocateAfterFailures();
51 static Handle<Object> TestAllocateAfterFailures();
54 static void ResetWeakHandle(bool global_gc);
57 } // namespace internal
60 #endif // HEAP_TESTER_H_