• Home
  • Raw
  • Download

Lines Matching full:replacements

83   // The replacements are not recursive.  in TEST()
146 std::map<const char *, const char *> replacements; in TEST() local
147 replacements["$who"] = "Bob"; in TEST()
148 replacements["$count"] = "5"; in TEST()
149 replacements["#Noun"] = "Apples"; in TEST()
151 replacements); in TEST()
167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local
168 replacements["$who"] = "Bob"; in TEST()
169 replacements["$count"] = "5"; in TEST()
170 replacements["#Noun"] = "Apples"; in TEST()
172 count = absl::StrReplaceAll(replacements, &s); in TEST()
196 std::vector<std::pair<std::string, std::string>> replacements; in TEST() local
199 EXPECT_EQ(0, absl::StrReplaceAll(replacements, &s)); in TEST()
203 replacements.push_back({"a", "A"}); in TEST()
204 EXPECT_EQ(1, absl::StrReplaceAll(replacements, &s)); in TEST()
208 replacements.push_back({"b", "B"}); in TEST()
209 EXPECT_EQ(2, absl::StrReplaceAll(replacements, &s)); in TEST()
213 replacements.push_back({"d", "D"}); in TEST()
214 EXPECT_EQ(2, absl::StrReplaceAll(replacements, &s)); in TEST()
217 EXPECT_EQ("ABcABc", absl::StrReplaceAll("abcabc", replacements)); in TEST()
221 std::map<const char*, const char*> replacements; in TEST() local
222 replacements["aa"] = "x"; in TEST()
223 replacements["a"] = "X"; in TEST()
225 EXPECT_EQ(2, absl::StrReplaceAll(replacements, &s)); in TEST()
228 EXPECT_EQ("xxX", absl::StrReplaceAll("aaaaa", replacements)); in TEST()
232 std::list<std::pair<absl::string_view, absl::string_view>> replacements = { in TEST() local
235 std::string s = absl::StrReplaceAll("abc", replacements); in TEST()
241 std::vector<X> replacements(3); in TEST() local
242 replacements[0] = X{"a", "x", 1}; in TEST()
243 replacements[1] = X{"b", "y", 0}; in TEST()
244 replacements[2] = X{"c", "z", -1}; in TEST()
246 std::string s = absl::StrReplaceAll("abc", replacements); in TEST()
251 std::vector<Cont> replacements(3); in TEST() local
252 replacements[0] = Cont{"a:x"}; in TEST()
253 replacements[1] = Cont{"b:y"}; in TEST()
254 replacements[2] = Cont{"c:z"}; in TEST()
256 std::string s = absl::StrReplaceAll("abc", replacements); in TEST()
262 // that returns the # of replacements performed.