// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "util/flat_map.h" #include <chrono> #include <string_view> #include "gtest/gtest.h" namespace openscreen { namespace { const FlatMap<int, std::string_view> kSimpleFlatMap{ … }; } // namespace TEST(FlatMapTest, Find) { … } // Since it is backed by a vector, we don't expose an operator[] due // to potential confusion. If the type of Key is int or std::size_t, do // you want the std::pair<Key, Value> or just the Value? TEST(FlatMapTest, Access) { … } TEST(FlatMapTest, ErasureAndEmplacement) { … } TEST(FlatMapTest, Mutation) { … } TEST(FlatMapTest, GenerallyBehavesLikeAVector) { … } TEST(FlatMapTest, CanUseNonDefaultConstructibleThings) { … } } // namespace openscreen