chromium/v8/test/unittests/heap/cppgc/page-memory-unittest.cc

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/heap/cppgc/page-memory.h"

#include <algorithm>

#include "src/base/page-allocator.h"
#include "src/heap/cppgc/platform.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace cppgc {
namespace internal {

TEST(MemoryRegionTest, Construct) {}

namespace {

Address AtOffset(uint8_t* base, intptr_t offset) {}

}  // namespace

TEST(MemoryRegionTest, ContainsAddress) {}

TEST(MemoryRegionTest, ContainsMemoryRegion) {}

TEST(PageMemoryTest, Construct) {}

#if DEBUG

TEST(PageMemoryDeathTest, ConstructNonContainedRegions) {}

#endif  // DEBUG

// See the comment in globals.h when setting |kGuardPageSize| for details.
#if !(defined(V8_TARGET_ARCH_ARM64) && defined(V8_OS_MACOS))
TEST(PageMemoryRegionTest, PlatformUsesGuardPages) {}
#endif  // !(defined(V8_TARGET_ARCH_ARM64) && defined(V8_OS_MACOS))

namespace {

V8_NOINLINE uint8_t access(volatile const uint8_t& u) {}

}  // namespace

TEST(PageBackendDeathTest, ReservationIsFreed) {}

TEST(PageBackendDeathTest, FrontGuardPageAccessCrashes) {}

TEST(PageBackendDeathTest, BackGuardPageAccessCrashes) {}

TEST(PageBackendTreeTest, AddNormalLookupRemove) {}

TEST(PageBackendTreeTest, AddLargeLookupRemove) {}

TEST(PageBackendTreeTest, AddLookupRemoveMultiple) {}

TEST(PageBackendPoolTest, ConstructorEmpty) {}

TEST(PageBackendPoolTest, AddTake) {}

namespace {
void AddTakeWithDiscardInBetween(bool decommit_pooled_pages) {}
}  // namespace

TEST(PageBackendPoolTest, AddTakeWithDiscardInBetween) {}

TEST(PageBackendPoolTest, AddTakeWithDiscardInBetweenWithDecommit) {}

TEST(PageBackendPoolTest, PoolMemoryAccounting) {}

TEST(PageBackendTest, AllocateNormalUsesPool) {}

TEST(PageBackendTest, AllocateLarge) {}

TEST(PageBackendTest, LookupNormal) {}

TEST(PageBackendTest, LookupLarge) {}

TEST(PageBackendDeathTest, DestructingBackendDestroysPageMemory) {}

}  // namespace internal
}  // namespace cppgc