• Home
  • Raw
  • Download

Lines Matching refs:StrReplaceAll

25 TEST(StrReplaceAll, OneReplacement) {  in TEST()  argument
29 s = absl::StrReplaceAll(s, {{"", ""}}); in TEST()
31 s = absl::StrReplaceAll(s, {{"x", ""}}); in TEST()
33 s = absl::StrReplaceAll(s, {{"", "y"}}); in TEST()
35 s = absl::StrReplaceAll(s, {{"x", "y"}}); in TEST()
39 s = absl::StrReplaceAll("abc", {{"", ""}}); in TEST()
41 s = absl::StrReplaceAll("abc", {{"", "y"}}); in TEST()
43 s = absl::StrReplaceAll("abc", {{"x", ""}}); in TEST()
47 s = absl::StrReplaceAll("abc", {{"xyz", "123"}}); in TEST()
51 s = absl::StrReplaceAll("abc", {{"abc", "xyz"}}); in TEST()
55 s = absl::StrReplaceAll("abc", {{"a", "x"}}); in TEST()
59 s = absl::StrReplaceAll("abc", {{"b", "x"}}); in TEST()
63 s = absl::StrReplaceAll("abc", {{"c", "x"}}); in TEST()
67 s = absl::StrReplaceAll("ababa", {{"a", "xxx"}}); in TEST()
70 s = absl::StrReplaceAll("ababa", {{"b", "xxx"}}); in TEST()
73 s = absl::StrReplaceAll("aaabaaabaaa", {{"aaa", "x"}}); in TEST()
76 s = absl::StrReplaceAll("abbbabbba", {{"bbb", "x"}}); in TEST()
80 s = absl::StrReplaceAll("aaa", {{"aa", "x"}}); in TEST()
84 s = absl::StrReplaceAll("aaa", {{"aa", "a"}}); in TEST()
88 TEST(StrReplaceAll, ManyReplacements) { in TEST() argument
92 s = absl::StrReplaceAll("", {{"", ""}, {"x", ""}, {"", "y"}, {"x", "y"}}); in TEST()
96 s = absl::StrReplaceAll("abc", {{"", ""}, {"", "y"}, {"x", ""}}); in TEST()
100 s = absl::StrReplaceAll("abc", {{"a", "x"}, {"b", "y"}, {"c", "z"}}); in TEST()
102 s = absl::StrReplaceAll("zxy", {{"z", "x"}, {"x", "y"}, {"y", "z"}}); in TEST()
106 s = absl::StrReplaceAll("abc", {{"a", "x"}, {"ab", "xy"}, {"abc", "xyz"}}); in TEST()
110 s = absl::StrReplaceAll( in TEST()
115 s = absl::StrReplaceAll( in TEST()
121 s = absl::StrReplaceAll("ababa", {{"a", "xxx"}, {"b", "XXXX"}}); in TEST()
125 s = absl::StrReplaceAll("aaa", {{"aa", "x"}, {"a", "X"}}); in TEST()
127 s = absl::StrReplaceAll("aaa", {{"a", "X"}, {"aa", "x"}}); in TEST()
131 s = absl::StrReplaceAll("the quick brown fox jumped over the lazy dogs", in TEST()
145 TEST(StrReplaceAll, ManyReplacementsInMap) { in TEST() argument
150 std::string s = absl::StrReplaceAll("$who bought $count #Noun. Thanks $who!", in TEST()
155 TEST(StrReplaceAll, ReplacementsInPlace) { in TEST() argument
158 count = absl::StrReplaceAll({{"$count", absl::StrCat(5)}, in TEST()
165 TEST(StrReplaceAll, ReplacementsInPlaceInMap) { in TEST() argument
172 count = absl::StrReplaceAll(replacements, &s); in TEST()
193 TEST(StrReplaceAll, VariableNumber) { in TEST() argument
199 EXPECT_EQ(0, absl::StrReplaceAll(replacements, &s)); in TEST()
204 EXPECT_EQ(1, absl::StrReplaceAll(replacements, &s)); in TEST()
209 EXPECT_EQ(2, absl::StrReplaceAll(replacements, &s)); in TEST()
214 EXPECT_EQ(2, absl::StrReplaceAll(replacements, &s)); in TEST()
217 EXPECT_EQ("ABcABc", absl::StrReplaceAll("abcabc", replacements)); in TEST()
225 EXPECT_EQ(2, absl::StrReplaceAll(replacements, &s)); in TEST()
228 EXPECT_EQ("xxX", absl::StrReplaceAll("aaaaa", replacements)); in TEST()
235 std::string s = absl::StrReplaceAll("abc", replacements); in TEST()
246 std::string s = absl::StrReplaceAll("abc", replacements); in TEST()
256 std::string s = absl::StrReplaceAll("abc", replacements); in TEST()
263 TEST(StrReplaceAll, Inplace) { in TEST() argument
269 reps = absl::StrReplaceAll({{"", ""}, {"x", ""}, {"", "y"}, {"x", "y"}}, &s); in TEST()
275 reps = absl::StrReplaceAll({{"", ""}, {"", "y"}, {"x", ""}}, &s); in TEST()
281 reps = absl::StrReplaceAll({{"a", "x"}, {"b", "y"}, {"c", "z"}}, &s); in TEST()
285 reps = absl::StrReplaceAll({{"z", "x"}, {"x", "y"}, {"y", "z"}}, &s); in TEST()
291 reps = absl::StrReplaceAll({{"a", "x"}, {"ab", "xy"}, {"abc", "xyz"}}, &s); in TEST()
297 reps = absl::StrReplaceAll( in TEST()
304 reps = absl::StrReplaceAll( in TEST()
311 reps = absl::StrReplaceAll({{"a", "xxx"}, {"b", "XXXX"}}, &s); in TEST()
317 reps = absl::StrReplaceAll({{"aa", "x"}, {"a", "X"}}, &s); in TEST()
321 reps = absl::StrReplaceAll({{"a", "X"}, {"aa", "x"}}, &s); in TEST()
327 reps = absl::StrReplaceAll( in TEST()