From 8e8f4f9db00b4f4f318c683c5c224f31af2afb19 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Tue, 5 Nov 2024 16:14:52 -0800 Subject: [PATCH] No public description PiperOrigin-RevId: 693511498 --- domain_tests/BUILD | 1 + domain_tests/CMakeLists.txt | 1 + domain_tests/string_domains_test.cc | 3 +++ e2e_tests/testdata/BUILD | 6 ++++++ e2e_tests/testdata/CMakeLists.txt | 6 ++++++ fuzztest/internal/domains/overlap_of_impl.h | 5 +++++ 6 files changed, 22 insertions(+) diff --git a/domain_tests/BUILD b/domain_tests/BUILD index 2a558cef..041ac42e 100644 --- a/domain_tests/BUILD +++ b/domain_tests/BUILD @@ -241,6 +241,7 @@ cc_test( "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/random", "@com_google_fuzztest//fuzztest:domain_core", + "@com_google_fuzztest//fuzztest:table_of_recent_compares", "@com_google_googletest//:gtest_main", ], ) diff --git a/domain_tests/CMakeLists.txt b/domain_tests/CMakeLists.txt index 8900ccc4..10953692 100644 --- a/domain_tests/CMakeLists.txt +++ b/domain_tests/CMakeLists.txt @@ -239,5 +239,6 @@ fuzztest_cc_test( absl::flat_hash_set absl::random_random fuzztest::domain_core + fuzztest::table_of_recent_compares GTest::gmock_main ) diff --git a/domain_tests/string_domains_test.cc b/domain_tests/string_domains_test.cc index 4b1b7f5b..c93bc4d8 100644 --- a/domain_tests/string_domains_test.cc +++ b/domain_tests/string_domains_test.cc @@ -15,6 +15,7 @@ // Tests of character and string domains. #include +#include #include #include #include @@ -27,6 +28,7 @@ #include "absl/random/random.h" #include "./fuzztest/domain_core.h" #include "./domain_tests/domain_testing.h" +#include "./fuzztest/internal/table_of_recent_compares.h" namespace fuzztest { namespace { @@ -37,6 +39,7 @@ using ::testing::Each; using ::testing::Eq; using ::testing::Ge; using ::testing::Gt; +using ::testing::HasSubstr; using ::testing::IsTrue; using ::testing::Lt; using ::testing::Matches; diff --git a/e2e_tests/testdata/BUILD b/e2e_tests/testdata/BUILD index e9a6d770..8ae5cb5a 100644 --- a/e2e_tests/testdata/BUILD +++ b/e2e_tests/testdata/BUILD @@ -84,19 +84,25 @@ cc_binary( "fuzz_tests_for_functional_testing.cc", "fuzz_tests_for_microbenchmarking.cc", "fuzz_tests_using_googletest.cc", + "fuzz_tests_with_proto_inputs.cc", ], deps = [ "@com_google_absl//absl/algorithm:container", + "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/functional:function_ref", + "@com_google_absl//absl/log:check", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/time", + "@com_google_absl//absl/types:span", "@com_google_fuzztest//fuzztest", "@com_google_fuzztest//fuzztest:fuzztest_gtest_main", "@com_google_fuzztest//fuzztest:googletest_fixture_adapter", "@com_google_fuzztest//fuzztest:logging", "@com_google_fuzztest//fuzztest:test_protobuf_cc_proto", "@com_google_protobuf//:protobuf", + "@com_googlesource_code_re2//:re2", ], ) diff --git a/e2e_tests/testdata/CMakeLists.txt b/e2e_tests/testdata/CMakeLists.txt index 03831059..bb25eacc 100644 --- a/e2e_tests/testdata/CMakeLists.txt +++ b/e2e_tests/testdata/CMakeLists.txt @@ -22,17 +22,23 @@ add_executable( fuzz_tests_for_functional_testing.cc fuzz_tests_for_microbenchmarking.cc fuzz_tests_using_googletest.cc + fuzz_tests_with_proto_inputs.cc ) target_link_libraries( fuzz_tests_for_functional_testing.stripped PUBLIC protobuf::libprotobuf test_protobuf + absl::check absl::algorithm_container + absl::flat_hash_map + absl::flat_hash_set absl::function_ref + absl::span absl::str_format absl::strings absl::time + re2::re2 fuzztest_googletest_fixture_adapter fuzztest_logging ) diff --git a/fuzztest/internal/domains/overlap_of_impl.h b/fuzztest/internal/domains/overlap_of_impl.h index 5caaaa3c..92ed0b9b 100644 --- a/fuzztest/internal/domains/overlap_of_impl.h +++ b/fuzztest/internal/domains/overlap_of_impl.h @@ -33,6 +33,10 @@ #include "./fuzztest/internal/status.h" #include "./fuzztest/internal/type_support.h" +namespace fuzztest::internal_no_adl { +auto Utf8String(); +} // namespace fuzztest::internal_no_adl + namespace fuzztest::internal { template @@ -183,6 +187,7 @@ class OverlapOfImpl private: friend class OverlapOfTestPeer; + friend auto internal_no_adl::Utf8String(); static constexpr size_t kNumDomains = sizeof...(Inner); static_assert(kNumDomains > 1,