15 #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MEMBERS_TEST_H_ 16 #define ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MEMBERS_TEST_H_ 18 #include <type_traits> 19 #include "gmock/gmock.h" 20 #include "gtest/gtest.h" 24 namespace container_internal {
26 template <
class UnordMap>
35 EXPECT_TRUE((std::is_same<
std::pair<
const typename TypeParam::key_type,
36 typename TypeParam::mapped_type>,
40 std::is_integral<typename TypeParam::size_type>>()));
42 std::is_signed<typename TypeParam::difference_type>,
43 std::is_integral<typename TypeParam::difference_type>>()));
44 EXPECT_TRUE((std::is_convertible<
45 decltype(std::declval<const typename TypeParam::hasher&>()(
46 std::declval<const typename TypeParam::key_type&>())),
48 EXPECT_TRUE((std::is_convertible<
49 decltype(std::declval<const typename TypeParam::key_equal&>()(
50 std::declval<const typename TypeParam::key_type&>(),
51 std::declval<const typename TypeParam::key_type&>())),
56 typename TypeParam::reference>()));
58 typename TypeParam::const_reference>()));
59 EXPECT_TRUE((std::is_same<
typename std::allocator_traits<
60 typename TypeParam::allocator_type>::pointer,
61 typename TypeParam::pointer>()));
63 (std::is_same<
typename std::allocator_traits<
64 typename TypeParam::allocator_type>::const_pointer,
65 typename TypeParam::const_pointer>()));
69 EXPECT_GT(TypeParam().max_size(), 0);
74 EXPECT_EQ(t.begin(), t.cbegin());
75 EXPECT_EQ(t.end(), t.cend());
76 EXPECT_NE(t.begin(), t.end());
77 EXPECT_NE(t.cbegin(), t.cend());
85 #endif // ABSL_CONTAINER_INTERNAL_UNORDERED_MAP_MEMBERS_TEST_H_ TYPED_TEST_SUITE_P(ConstructorTest)
std::pair< std::string, std::string > pair
REGISTER_TYPED_TEST_SUITE_P(MembersTest, Typedefs, SimpleFunctions, BeginEnd)
TYPED_TEST_P(ConstructorTest, NoArgs)