chromium/base/containers/flat_map_unittest.cc

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

#include "base/containers/flat_map.h"

#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

#include "base/ranges/algorithm.h"
#include "base/test/move_only_int.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

// A flat_map is basically a interface to flat_tree. So several basic
// operations are tested to make sure things are set up properly, but the bulk
// of the tests are in flat_tree_unittests.cc.

ElementsAre;

namespace base {

namespace {

struct Unsortable {};

bool operator==(const Unsortable& lhs, const Unsortable& rhs) {}

bool operator<(const Unsortable& lhs, const Unsortable& rhs) = delete;
bool operator<=(const Unsortable& lhs, const Unsortable& rhs) = delete;
bool operator>(const Unsortable& lhs, const Unsortable& rhs) = delete;
bool operator>=(const Unsortable& lhs, const Unsortable& rhs) = delete;

class ImplicitInt {};

}  // namespace

TEST(FlatMap, IncompleteType) {}

TEST(FlatMap, RangeConstructor) {}

TEST(FlatMap, MoveConstructor) {}

TEST(FlatMap, VectorConstructor) {}

TEST(FlatMap, InitializerListConstructor) {}

TEST(FlatMap, SortedRangeConstructor) {}

TEST(FlatMap, SortedCopyFromVectorConstructor) {}

TEST(FlatMap, SortedMoveFromVectorConstructor) {}

TEST(FlatMap, SortedInitializerListConstructor) {}

TEST(FlatMap, InitializerListAssignment) {}

TEST(FlatMap, InsertFindSize) {}

TEST(FlatMap, CopySwap) {}

// operator[](const Key&)
TEST(FlatMap, SubscriptConstKey) {}

// operator[](Key&&)
TEST(FlatMap, SubscriptMoveOnlyKey) {}

// Mapped& at(const Key&)
// const Mapped& at(const Key&) const
TEST(FlatMap, AtFunction) {}

// insert_or_assign(K&&, M&&)
TEST(FlatMap, InsertOrAssignMoveOnlyKey) {}

// insert_or_assign(const_iterator hint, K&&, M&&)
TEST(FlatMap, InsertOrAssignMoveOnlyKeyWithHint) {}

// try_emplace(K&&, Args&&...)
TEST(FlatMap, TryEmplaceMoveOnlyKey) {}

// try_emplace(const_iterator hint, K&&, Args&&...)
TEST(FlatMap, TryEmplaceMoveOnlyKeyWithHint) {}

TEST(FlatMap, UsingTransparentCompare) {}

TEST(FlatMap, UsingInitializerList) {}

TEST(FlatMap, DeductionGuides) {}

}  // namespace base