• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Abseil Authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include <memory>
16 #include <unordered_map>
17 
18 #include "absl/container/internal/unordered_map_constructor_test.h"
19 #include "absl/container/internal/unordered_map_lookup_test.h"
20 #include "absl/container/internal/unordered_map_members_test.h"
21 #include "absl/container/internal/unordered_map_modifiers_test.h"
22 
23 namespace absl {
24 ABSL_NAMESPACE_BEGIN
25 namespace container_internal {
26 namespace {
27 
28 using MapTypes = ::testing::Types<
29     std::unordered_map<int, int, StatefulTestingHash, StatefulTestingEqual,
30                        Alloc<std::pair<const int, int>>>,
31     std::unordered_map<std::string, std::string, StatefulTestingHash,
32                        StatefulTestingEqual,
33                        Alloc<std::pair<const std::string, std::string>>>>;
34 
35 INSTANTIATE_TYPED_TEST_SUITE_P(UnorderedMap, ConstructorTest, MapTypes);
36 INSTANTIATE_TYPED_TEST_SUITE_P(UnorderedMap, LookupTest, MapTypes);
37 INSTANTIATE_TYPED_TEST_SUITE_P(UnorderedMap, MembersTest, MapTypes);
38 INSTANTIATE_TYPED_TEST_SUITE_P(UnorderedMap, ModifiersTest, MapTypes);
39 
40 using UniquePtrMapTypes = ::testing::Types<std::unordered_map<
41     int, std::unique_ptr<int>, StatefulTestingHash, StatefulTestingEqual,
42     Alloc<std::pair<const int, std::unique_ptr<int>>>>>;
43 
44 INSTANTIATE_TYPED_TEST_SUITE_P(UnorderedMap, UniquePtrModifiersTest,
45                                UniquePtrMapTypes);
46 
47 }  // namespace
48 }  // namespace container_internal
49 ABSL_NAMESPACE_END
50 }  // namespace absl
51