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.
pull/1243/head
Herbert Thielen 8 years ago
parent 520ad96b78
commit 8abacca52e
  1. 4
      googletest/test/gtest-param-test_test.cc

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

Loading…
Cancel
Save