avoid -Wshadow warning on GCC

When using INSTANTIATE_TEST_CASE_P with a lambda function which uses
'info' as parameter name, GCC complains that this would shadow
parameter 'info' used in the macro's VA_ARGS call.
This commit is contained in:
Herbert Thielen 2017-09-04 13:23:08 +02:00
parent 520ad96b78
commit 8abacca52e

View File

@ -857,8 +857,8 @@ TEST_P(CustomLambdaNamingTest, CustomTestNames) {}
INSTANTIATE_TEST_CASE_P(CustomParamNameLambda, INSTANTIATE_TEST_CASE_P(CustomParamNameLambda,
CustomLambdaNamingTest, CustomLambdaNamingTest,
Values(std::string("LambdaName")), Values(std::string("LambdaName")),
[](const ::testing::TestParamInfo<std::string>& info) { [](const ::testing::TestParamInfo<std::string>& tpinfo) {
return info.param; return tpinfo.param;
}); });
#endif // GTEST_LANG_CXX11 #endif // GTEST_LANG_CXX11