mirror of
https://github.com/google/googletest.git
synced 2025-03-19 18:33:48 +00:00
Googletest export
Adding std:: namespace to string in the example PiperOrigin-RevId: 320327910
This commit is contained in:
parent
c7f05e08af
commit
70b90929b1
@ -1490,7 +1490,7 @@ for conciseness:
|
|||||||
```c++
|
```c++
|
||||||
enum class MyType { MY_FOO = 0, MY_BAR = 1 };
|
enum class MyType { MY_FOO = 0, MY_BAR = 1 };
|
||||||
|
|
||||||
class MyTestSuite : public testing::TestWithParam<std::tuple<MyType, string>> {
|
class MyTestSuite : public testing::TestWithParam<std::tuple<MyType, std::string>> {
|
||||||
};
|
};
|
||||||
|
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
@ -1499,7 +1499,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
testing::Values(MyType::VALUE_0, MyType::VALUE_1),
|
testing::Values(MyType::VALUE_0, MyType::VALUE_1),
|
||||||
testing::ValuesIn("", "")),
|
testing::ValuesIn("", "")),
|
||||||
[](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
|
[](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
|
||||||
string name = absl::StrCat(
|
std::string name = absl::StrCat(
|
||||||
std::get<0>(info.param) == MY_FOO ? "Foo" : "Bar", "_",
|
std::get<0>(info.param) == 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); }, '_');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user