mirror of
https://github.com/google/googletest.git
synced 2025-03-19 18:33:48 +00:00
Googletest export
Fix enum names in a value-parameterized test example. PiperOrigin-RevId: 360559723
This commit is contained in:
parent
de41f8223c
commit
32983d211b
@ -1501,11 +1501,11 @@ class MyTestSuite : public testing::TestWithParam<std::tuple<MyType, std::string
|
|||||||
INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
MyGroup, MyTestSuite,
|
MyGroup, MyTestSuite,
|
||||||
testing::Combine(
|
testing::Combine(
|
||||||
testing::Values(MyType::VALUE_0, MyType::VALUE_1),
|
testing::Values(MyType::MY_FOO, MyType::MY_BAR),
|
||||||
testing::Values("A", "B")),
|
testing::Values("A", "B")),
|
||||||
[](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
|
[](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
|
||||||
std::string name = absl::StrCat(
|
std::string name = absl::StrCat(
|
||||||
std::get<0>(info.param) == MY_FOO ? "Foo" : "Bar",
|
std::get<0>(info.param) == MyType::MY_FOO ? "Foo" : "Bar",
|
||||||
std::get<1>(info.param));
|
std::get<1>(info.param));
|
||||||
absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '');
|
absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '');
|
||||||
return name;
|
return name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user