#include "components/gwp_asan/client/lightweight_detector/random_eviction_quarantine.h"
#include <type_traits>
#include "base/auto_reset.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace gwp_asan::internal::lud {
_;
Return;
namespace {
class TestRandomEvictionQuarantine final : public RandomEvictionQuarantineBase { … };
AllocationInfo MakeAllocationInfo(
void* address,
uint32_t size,
FreeFunctionKind kind = FreeFunctionKind::kFree,
void* context = nullptr) { … }
constexpr size_t kMaxAllocationCount = …;
constexpr size_t kMaxTotalSize = …;
constexpr size_t kTotalSizeHighWaterMark = …;
constexpr size_t kTotalSizeLowWaterMark = …;
constexpr size_t kEvictionChunkSize = …;
constexpr size_t kEvictionTaskIntervalMs = …;
}
class RandomEvictionQuarantineTest : public testing::Test { … };
TEST_F(RandomEvictionQuarantineTest, WrongSize) { … }
TEST_F(RandomEvictionQuarantineTest, SingleAllocation) { … }
TEST_F(RandomEvictionQuarantineTest, SlotReuse) { … }
TEST_F(RandomEvictionQuarantineTest, Trim) { … }
}