#include <algorithm>
#include "include/cppgc/allocation.h"
#include "include/cppgc/heap.h"
#include "src/heap/cppgc/heap-base.h"
#include "src/heap/cppgc/process-heap.h"
#include "test/unittests/heap/cppgc/tests.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cppgc {
namespace internal {
class HeapRegistryTest : public testing::TestWithPlatform { … };
TEST_F(HeapRegistryTest, Empty) { … }
namespace {
bool Contains(const HeapRegistry::Storage& storage, const cppgc::Heap* needle) { … }
}
TEST_F(HeapRegistryTest, RegisterUnregisterHeaps) { … }
TEST_F(HeapRegistryTest, DoesNotFindNullptr) { … }
TEST_F(HeapRegistryTest, DoesNotFindStackAddress) { … }
TEST_F(HeapRegistryTest, DoesNotFindOffHeap) { … }
namespace {
class GCed final : public GarbageCollected<GCed> { … };
}
TEST_F(HeapRegistryTest, FindsRightHeapForOnHeapAddress) { … }
}
}