chromium/third_party/abseil-cpp/absl/container/internal/raw_hash_set_allocator_test.cc

// Copyright 2018 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <cstddef>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <ostream>
#include <set>
#include <type_traits>
#include <utility>

#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/config.h"
#include "absl/container/internal/container_memory.h"
#include "absl/container/internal/raw_hash_set.h"
#include "absl/container/internal/tracked.h"

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace container_internal {
namespace {
AnyOf;

enum AllocSpec {};

struct AllocState {};

template <class T,
          int Spec = kPropagateOnCopy | kPropagateOnMove | kPropagateOnSwap>
class CheckedAlloc {};

struct Identity {};

struct Policy {};

template <int Spec>
struct PropagateTest : public ::testing::Test {};

PropagateOnAll;
NoPropagateOnCopy;
NoPropagateOnMove;

TEST_F(PropagateOnAll, Empty) {}

TEST_F(PropagateOnAll, InsertAllocates) {}

TEST_F(PropagateOnAll, InsertDecomposes) {}

TEST_F(PropagateOnAll, RehashMoves) {}

TEST_F(PropagateOnAll, CopyConstructor) {}

TEST_F(NoPropagateOnCopy, CopyConstructor) {}

TEST_F(PropagateOnAll, CopyConstructorWithSameAlloc) {}

TEST_F(NoPropagateOnCopy, CopyConstructorWithSameAlloc) {}

TEST_F(PropagateOnAll, CopyConstructorWithDifferentAlloc) {}

TEST_F(NoPropagateOnCopy, CopyConstructorWithDifferentAlloc) {}

TEST_F(PropagateOnAll, MoveConstructor) {}

TEST_F(NoPropagateOnMove, MoveConstructor) {}

TEST_F(PropagateOnAll, MoveConstructorWithSameAlloc) {}

TEST_F(NoPropagateOnMove, MoveConstructorWithSameAlloc) {}

TEST_F(PropagateOnAll, MoveConstructorWithDifferentAlloc) {}

TEST_F(NoPropagateOnMove, MoveConstructorWithDifferentAlloc) {}

TEST_F(PropagateOnAll, CopyAssignmentWithSameAlloc) {}

TEST_F(NoPropagateOnCopy, CopyAssignmentWithSameAlloc) {}

TEST_F(PropagateOnAll, CopyAssignmentWithDifferentAlloc) {}

TEST_F(NoPropagateOnCopy, CopyAssignmentWithDifferentAlloc) {}

TEST_F(PropagateOnAll, MoveAssignmentWithSameAlloc) {}

TEST_F(NoPropagateOnMove, MoveAssignmentWithSameAlloc) {}

TEST_F(PropagateOnAll, MoveAssignmentWithDifferentAlloc) {}

TEST_F(NoPropagateOnMove, MoveAssignmentWithDifferentAlloc) {}

TEST_F(PropagateOnAll, Swap) {}

// This allocator is similar to std::pmr::polymorphic_allocator.
// Note the disabled assignment.
template <class T>
class PAlloc {};

TEST(NoPropagateDeletedAssignment, CopyConstruct) {}

TEST(NoPropagateDeletedAssignment, CopyAssignment) {}

TEST(NoPropagateDeletedAssignment, MoveAssignment) {}

}  // namespace
}  // namespace container_internal
ABSL_NAMESPACE_END
}  // namespace absl