diff options
author | David Benjamin <davidben@google.com> | 2017-02-11 00:19:54 (GMT) |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2018-01-03 19:50:22 (GMT) |
commit | b3d9be5c1d969dfdbf1f1ff924b9fd1be5eaecc9 (patch) | |
tree | 3ffa0c2921d9f401e92ada32cc5f6d1f9f3258b9 /googletest/include/gtest/gtest-param-test.h | |
parent | ba6ecedede74521490f36b6aea08f91fdad6d201 (diff) | |
download | googletest-b3d9be5c1d969dfdbf1f1ff924b9fd1be5eaecc9.zip googletest-b3d9be5c1d969dfdbf1f1ff924b9fd1be5eaecc9.tar.gz googletest-b3d9be5c1d969dfdbf1f1ff924b9fd1be5eaecc9.tar.bz2 |
Pass the -Wmissing-declarations warning.
This makes it easier to use GTest in projects that build with the
-Wmissing-declarations warning. This fixes the warning in headers and
source files, though not GTest's own tests as it is rather noisy there.
Diffstat (limited to 'googletest/include/gtest/gtest-param-test.h')
-rw-r--r-- | googletest/include/gtest/gtest-param-test.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/googletest/include/gtest/gtest-param-test.h b/googletest/include/gtest/gtest-param-test.h index 7548a7c..83dd8da 100644 --- a/googletest/include/gtest/gtest-param-test.h +++ b/googletest/include/gtest/gtest-param-test.h @@ -1407,21 +1407,21 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3, // type testing::TestParamInfo<class ParamType>, and return std::string. // // testing::PrintToStringParamName is a builtin test suffix generator that -// returns the value of testing::PrintToString(GetParam()). It does not work -// for std::string or C strings. +// returns the value of testing::PrintToString(GetParam()). // // Note: test names must be non-empty, unique, and may only contain ASCII -// alphanumeric characters or underscore. +// alphanumeric characters or underscore. Because PrintToString adds quotes +// to std::string and C strings, it won't work for these types. # define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator, ...) \ - ::testing::internal::ParamGenerator<test_case_name::ParamType> \ + static ::testing::internal::ParamGenerator<test_case_name::ParamType> \ gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ - ::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \ + static ::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \ const ::testing::TestParamInfo<test_case_name::ParamType>& info) { \ return ::testing::internal::GetParamNameGen<test_case_name::ParamType> \ (__VA_ARGS__)(info); \ } \ - int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \ + static int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \ ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ GetTestCasePatternHolder<test_case_name>(\ #test_case_name, \ |