chromium/components/gwp_asan/common/allocator_state_unittest.cc

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

#include "components/gwp_asan/common/allocator_state.h"

#include <limits>

#include "base/memory/page_size.h"
#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace gwp_asan {
namespace internal {

GetMetadataReturnType;

static constexpr size_t kMaxMetadata =;
static constexpr size_t kMaxRequestedSlots =;
static constexpr size_t kMaxReservedSlots =;

class AllocatorStateTest : public testing::Test {};

TEST_F(AllocatorStateTest, Valid) {}

TEST_F(AllocatorStateTest, InvalidNumMetadata) {}

TEST_F(AllocatorStateTest, InvalidNumPages) {}

TEST_F(AllocatorStateTest, InvalidPageSize) {}

TEST_F(AllocatorStateTest, InvalidAddresses) {}

TEST_F(AllocatorStateTest, GetNearestValidPageEdgeCases) {}

TEST_F(AllocatorStateTest, GetErrorTypeEdgeCases) {}

// Correctly handle the edge case when a free() occurs on a page that has never
// been allocated.
TEST_F(AllocatorStateTest, GetErrorTypeFreeInvalidAddressEdgeCase) {}

TEST_F(AllocatorStateTest, GetMetadataForAddress) {}

}  // namespace internal
}  // namespace gwp_asan