Export of internal Abseil changes
-- ea0cfebeb69b25bec343652bbe1a203f5476c51a by Mark Barolak <mbar@google.com>: Change "std::string" to "string" in places where a "std::" qualification was incorrectly inserted by automation. PiperOrigin-RevId: 300108520 GitOrigin-RevId: ea0cfebeb69b25bec343652bbe1a203f5476c51a Change-Id: Ie3621e63a6ebad67b9fe56a3ebe33e1d50dac602
This commit is contained in:
parent
d936052d32
commit
a877af1f29
68 changed files with 191 additions and 191 deletions
|
|
@ -25,7 +25,7 @@
|
|||
TEST(StrReplaceAll, OneReplacement) {
|
||||
std::string s;
|
||||
|
||||
// Empty std::string.
|
||||
// Empty string.
|
||||
s = absl::StrReplaceAll(s, {{"", ""}});
|
||||
EXPECT_EQ(s, "");
|
||||
s = absl::StrReplaceAll(s, {{"x", ""}});
|
||||
|
|
@ -47,7 +47,7 @@ TEST(StrReplaceAll, OneReplacement) {
|
|||
s = absl::StrReplaceAll("abc", {{"xyz", "123"}});
|
||||
EXPECT_EQ(s, "abc");
|
||||
|
||||
// Replace entire std::string.
|
||||
// Replace entire string.
|
||||
s = absl::StrReplaceAll("abc", {{"abc", "xyz"}});
|
||||
EXPECT_EQ(s, "xyz");
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ TEST(StrReplaceAll, OneReplacement) {
|
|||
TEST(StrReplaceAll, ManyReplacements) {
|
||||
std::string s;
|
||||
|
||||
// Empty std::string.
|
||||
// Empty string.
|
||||
s = absl::StrReplaceAll("", {{"", ""}, {"x", ""}, {"", "y"}, {"x", "y"}});
|
||||
EXPECT_EQ(s, "");
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ TEST(StrReplaceAll, ManyReplacements) {
|
|||
s = absl::StrReplaceAll("abc", {{"", ""}, {"", "y"}, {"x", ""}});
|
||||
EXPECT_EQ(s, "abc");
|
||||
|
||||
// Replace entire std::string, one char at a time
|
||||
// Replace entire string, one char at a time
|
||||
s = absl::StrReplaceAll("abc", {{"a", "x"}, {"b", "y"}, {"c", "z"}});
|
||||
EXPECT_EQ(s, "xyz");
|
||||
s = absl::StrReplaceAll("zxy", {{"z", "x"}, {"x", "y"}, {"y", "z"}});
|
||||
|
|
@ -264,7 +264,7 @@ TEST(StrReplaceAll, Inplace) {
|
|||
std::string s;
|
||||
int reps;
|
||||
|
||||
// Empty std::string.
|
||||
// Empty string.
|
||||
s = "";
|
||||
reps = absl::StrReplaceAll({{"", ""}, {"x", ""}, {"", "y"}, {"x", "y"}}, &s);
|
||||
EXPECT_EQ(reps, 0);
|
||||
|
|
@ -276,7 +276,7 @@ TEST(StrReplaceAll, Inplace) {
|
|||
EXPECT_EQ(reps, 0);
|
||||
EXPECT_EQ(s, "abc");
|
||||
|
||||
// Replace entire std::string, one char at a time
|
||||
// Replace entire string, one char at a time
|
||||
s = "abc";
|
||||
reps = absl::StrReplaceAll({{"a", "x"}, {"b", "y"}, {"c", "z"}}, &s);
|
||||
EXPECT_EQ(reps, 3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue