diff options
author | Dennis Kormalev <denk@google.com> | 2024-02-05 10:56:44 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-02-05 10:57:32 -0800 |
commit | ddcf8be90575d494e40fcd4e0c408f0237efe0da (patch) | |
tree | 2baec332bc95911d0b0841ed17ccb79d10724e3c /absl/container | |
parent | c680be45e2be57dffcabed3dec8365b6dcfe5381 (diff) |
Enable StringLikeTest in hash_function_defaults_test
PiperOrigin-RevId: 604369517
Change-Id: I6024a8828563c5a2487ba85ede91a88d7059f9c8
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/internal/hash_function_defaults_test.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/absl/container/internal/hash_function_defaults_test.cc b/absl/container/internal/hash_function_defaults_test.cc index c31af3be..7da0c86a 100644 --- a/absl/container/internal/hash_function_defaults_test.cc +++ b/absl/container/internal/hash_function_defaults_test.cc @@ -476,27 +476,25 @@ struct StringLikeTest : public ::testing::Test { hash_default_hash<typename T::first_type> hash; }; -TYPED_TEST_SUITE_P(StringLikeTest); +TYPED_TEST_SUITE(StringLikeTest, StringTypesCartesianProduct); -TYPED_TEST_P(StringLikeTest, Eq) { +TYPED_TEST(StringLikeTest, Eq) { EXPECT_TRUE(this->eq(this->a1, this->b1)); EXPECT_TRUE(this->eq(this->b1, this->a1)); } -TYPED_TEST_P(StringLikeTest, NotEq) { +TYPED_TEST(StringLikeTest, NotEq) { EXPECT_FALSE(this->eq(this->a1, this->b2)); EXPECT_FALSE(this->eq(this->b2, this->a1)); } -TYPED_TEST_P(StringLikeTest, HashEq) { +TYPED_TEST(StringLikeTest, HashEq) { EXPECT_EQ(this->hash(this->a1), this->hash(this->b1)); EXPECT_EQ(this->hash(this->a2), this->hash(this->b2)); // It would be a poor hash function which collides on these strings. EXPECT_NE(this->hash(this->a1), this->hash(this->b2)); } -TYPED_TEST_SUITE(StringLikeTest, StringTypesCartesianProduct); - } // namespace } // namespace container_internal ABSL_NAMESPACE_END |