chromium/v8/test/unittests/heap/cppgc/stats-collector-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/stats-collector.h"

#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace cppgc {
namespace internal {

namespace {

constexpr size_t kNoMarkedBytes =;

constexpr size_t kMinReportedSize =;

class StatsCollectorTest : public ::testing::Test {};

}  // namespace

TEST_F(StatsCollectorTest, NoMarkedBytes) {}

TEST_F(StatsCollectorTest, EventPrevGCMarkedObjectSize) {}

TEST_F(StatsCollectorTest, AllocationNoReportBelowAllocationThresholdBytes) {}

TEST_F(StatsCollectorTest, AlllocationReportAboveAllocationThresholdBytes) {}

TEST_F(StatsCollectorTest, InitialAllocatedObjectSize) {}

TEST_F(StatsCollectorTest, AllocatedObjectSize) {}

TEST_F(StatsCollectorTest, AllocatedObjectSizeNoMarkedBytes) {}

TEST_F(StatsCollectorTest, AllocatedObjectSizeAllocateAfterMarking) {}

class MockAllocationObserver : public StatsCollector::AllocationObserver {};

TEST_F(StatsCollectorTest, RegisterUnregisterObserver) {}

TEST_F(StatsCollectorTest, ObserveAllocatedObjectSizeIncreaseAndDecrease) {}

namespace {

void FakeGC(StatsCollector* stats, size_t marked_bytes) {}

}  // namespace

TEST_F(StatsCollectorTest, ObserveResetAllocatedObjectSize) {}

TEST_F(StatsCollectorTest, ObserveAllocatedMemoryIncreaseAndDecrease) {}

namespace {

class AllocationObserverTriggeringGC final
    : public StatsCollector::AllocationObserver {};

}  // namespace

TEST_F(StatsCollectorTest, ObserverTriggersGC) {}

TEST_F(StatsCollectorTest, AllocatedMemorySize) {}

TEST_F(StatsCollectorTest, DiscardedMemorySize) {}

TEST_F(StatsCollectorTest, ResidentMemorySizeWithoutDiscarded) {}

TEST_F(StatsCollectorTest, ResidentMemorySizeWithDiscarded) {}

}  // namespace internal
}  // namespace cppgc