Add GTEST_ATTRIBUTE_UNUSED_ to the dummy variable generated in

INSTANTIATE_TEST_CASE_P.
This commit is contained in:
kosak 2015-07-13 22:45:50 +00:00
parent 0f3d673be1
commit d5ac8cd9eb
2 changed files with 2 additions and 2 deletions

View File

@ -1406,7 +1406,7 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
::testing::internal::ParamGenerator<test_case_name::ParamType> \
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
int gtest_##prefix##test_case_name##_dummy_ = \
int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
GetTestCasePatternHolder<test_case_name>(\
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\

View File

@ -472,7 +472,7 @@ internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
::testing::internal::ParamGenerator<test_case_name::ParamType> \
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
int gtest_##prefix##test_case_name##_dummy_ = \
int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
GetTestCasePatternHolder<test_case_name>(\
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\