chromium/net/third_party/quiche/src/quiche/common/quiche_circular_deque_test.cc

// Copyright (c) 2019 The Chromium 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 "quiche/common/quiche_circular_deque.h"

#include <cstddef>
#include <cstdint>
#include <list>
#include <memory>
#include <ostream>
#include <type_traits>
#include <utility>

#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/platform/api/quiche_test.h"

ElementsAre;

namespace quiche {
namespace test {
namespace {

template <typename T, template <typename> class BaseAllocator = std::allocator>
class CountingAllocator : public BaseAllocator<T> {};

template <typename T, typename propagate_on_copy_assignment,
          typename propagate_on_move_assignment, typename propagate_on_swap,
          bool equality_result,
          template <typename> class BaseAllocator = std::allocator>
struct ConfigurableAllocator : public BaseAllocator<T> {};

// [1, 2, 3, 4] ==> [4, 1, 2, 3]
template <typename Deque>
void ShiftRight(Deque* dq, bool emplace) {}

// [1, 2, 3, 4] ==> [2, 3, 4, 1]
template <typename Deque>
void ShiftLeft(Deque* dq, bool emplace) {}

class QuicheCircularDequeTest : public QuicheTest {};

TEST_F(QuicheCircularDequeTest, Empty) {}

TEST_F(QuicheCircularDequeTest, Constructor) {}

TEST_F(QuicheCircularDequeTest, Assign) {}

TEST_F(QuicheCircularDequeTest, Access) {}

TEST_F(QuicheCircularDequeTest, Iterate) {}

TEST_F(QuicheCircularDequeTest, Iterator) {}

TEST_F(QuicheCircularDequeTest, Resize) {}

namespace {
class Foo {};
}  // namespace

TEST_F(QuicheCircularDequeTest, RelocateNonTriviallyCopyable) {}

TEST_F(QuicheCircularDequeTest, PushPop) {}

TEST_F(QuicheCircularDequeTest, Allocation) {}

}  // namespace
}  // namespace test
}  // namespace quiche

// Use a non-quiche namespace to make sure swap can be used via ADL.
namespace {

SwappableAllocator;

UnswappableEqualAllocator;

UnswappableUnequalAllocator;

QuicheCircularDequeTest;

TEST_F(QuicheCircularDequeTest, Swap) {}
}  // namespace