chromium/third_party/pdfium/fxjs/gc/heap_unittest.cpp

// Copyright 2020 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "fxjs/gc/heap.h"

#include <memory>
#include <set>

#include "core/fxcrt/containers/contains.h"
#include "testing/fxgc_unittest.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/v8_test_environment.h"
#include "v8/include/cppgc/allocation.h"
#include "v8/include/cppgc/persistent.h"

namespace {

class PseudoCollectible : public cppgc::GarbageCollected<PseudoCollectible> {};

std::set<const PseudoCollectible*> PseudoCollectible::s_live_;
std::set<const PseudoCollectible*> PseudoCollectible::s_dead_;

class CollectibleHolder {};

class Bloater : public cppgc::GarbageCollected<Bloater> {};

}  // namespace

class HeapUnitTest : public FXGCUnitTest {};

TEST_F(HeapUnitTest, SeveralHeaps) {}

TEST_F(HeapUnitTest, NoReferences) {}

TEST_F(HeapUnitTest, HasReferences) {}

// TODO(tsepez): enable when CPPGC fixes this segv.
TEST_F(HeapUnitTest, DISABLED_DeleteHeapHasReferences) {}

TEST_F(HeapUnitTest, DeleteHeapNoReferences) {}

TEST_F(HeapUnitTest, Bloat) {}