15 #ifndef ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MEMBERS_TEST_H_ 16 #define ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MEMBERS_TEST_H_ 18 #include <type_traits> 19 #include "gmock/gmock.h" 20 #include "gtest/gtest.h" 24 namespace container_internal {
26 template <
class UnordSet>
27 class MembersTest :
public ::testing::Test {};
35 EXPECT_TRUE((std::is_same<
typename TypeParam::key_type,
39 std::is_integral<typename TypeParam::size_type>>()));
41 std::is_signed<typename TypeParam::difference_type>,
42 std::is_integral<typename TypeParam::difference_type>>()));
43 EXPECT_TRUE((std::is_convertible<
44 decltype(std::declval<const typename TypeParam::hasher&>()(
45 std::declval<const typename TypeParam::key_type&>())),
47 EXPECT_TRUE((std::is_convertible<
48 decltype(std::declval<const typename TypeParam::key_equal&>()(
49 std::declval<const typename TypeParam::key_type&>(),
50 std::declval<const typename TypeParam::key_type&>())),
55 typename TypeParam::reference>()));
57 typename TypeParam::const_reference>()));
58 EXPECT_TRUE((std::is_same<
typename std::allocator_traits<
59 typename TypeParam::allocator_type>::pointer,
60 typename TypeParam::pointer>()));
62 (std::is_same<
typename std::allocator_traits<
63 typename TypeParam::allocator_type>::const_pointer,
64 typename TypeParam::const_pointer>()));
68 EXPECT_GT(TypeParam().max_size(), 0);
73 EXPECT_EQ(t.begin(), t.cbegin());
74 EXPECT_EQ(t.end(), t.cend());
75 EXPECT_NE(t.begin(), t.end());
76 EXPECT_NE(t.cbegin(), t.cend());
84 #endif // ABSL_CONTAINER_INTERNAL_UNORDERED_SET_MEMBERS_TEST_H_ TYPED_TEST_SUITE_P(ConstructorTest)
REGISTER_TYPED_TEST_SUITE_P(MembersTest, Typedefs, SimpleFunctions, BeginEnd)
TYPED_TEST_P(ConstructorTest, NoArgs)