chromium/v8/test/unittests/heap/heap-unittest.cc

// Copyright 2014 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/heap.h"

#include <cmath>
#include <iostream>
#include <limits>

#include "include/v8-isolate.h"
#include "include/v8-object.h"
#include "src/flags/flags.h"
#include "src/handles/handles-inl.h"
#include "src/heap/gc-tracer-inl.h"
#include "src/heap/gc-tracer.h"
#include "src/heap/marking-state-inl.h"
#include "src/heap/minor-mark-sweep.h"
#include "src/heap/mutable-page-metadata.h"
#include "src/heap/remembered-set.h"
#include "src/heap/safepoint.h"
#include "src/heap/spaces-inl.h"
#include "src/heap/trusted-range.h"
#include "src/objects/js-array-buffer-inl.h"
#include "src/objects/objects-inl.h"
#include "test/unittests/heap/heap-utils.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace v8 {
namespace internal {

using HeapTest = TestWithHeapInternalsAndContext;

TEST(Heap, YoungGenerationSizeFromOldGenerationSize) {}

TEST(Heap, GenerationSizesFromHeapSize) {}

TEST(Heap, HeapSizeFromPhysicalMemory) {}

TEST_F(HeapTest, ASLR) {}

TEST_F(HeapTest, ExternalLimitDefault) {}

TEST_F(HeapTest, ExternalLimitStaysAboveDefaultForExplicitHandling) {}

#ifdef V8_COMPRESS_POINTERS
TEST_F(HeapTest, HeapLayout) {}
#endif  // V8_COMPRESS_POINTERS

namespace {
void ShrinkNewSpace(NewSpace* new_space) {}
}  // namespace

TEST_F(HeapTest, GrowAndShrinkNewSpace) {}

TEST_F(HeapTest, CollectingAllAvailableGarbageShrinksNewSpace) {}

// Test that HAllocateObject will always return an object in new-space.
TEST_F(HeapTest, OptimizedAllocationAlwaysInNewSpace) {}

namespace {
template <RememberedSetType direction>
static size_t GetRememberedSetSize(Tagged<HeapObject> obj) {}
}  // namespace

TEST_F(HeapTest, RememberedSet_InsertOnPromotingObjectToOld) {}

TEST_F(HeapTest, Regress978156) {}

#ifdef V8_ENABLE_ALLOCATION_TIMEOUT
namespace {
struct RandomGCIntervalTestSetter {};

struct HeapTestWithRandomGCInterval : RandomGCIntervalTestSetter, HeapTest {};
}  // namespace

TEST_F(HeapTestWithRandomGCInterval, AllocationTimeout) {}
#endif  // V8_ENABLE_ALLOCATION_TIMEOUT

TEST_F(HeapTest, Regress341769455) {}

}  // namespace internal
}  // namespace v8