Lines Matching full:replacement
36 Replacement createReplacement(SourceLocation Start, unsigned Length,
38 return Replacement(Context.Sources, Start, Length, ReplacementText);
47 Replacement Replace(createReplacement(Location, 4, ""));
55 Replacement Replace(createReplacement(Location, 17, ""));
63 Replacement Replace(createReplacement(Location, 0, "result"));
72 Replacement Replace(createReplacement(Location, 12, "x"));
81 Replacement Replace1(createReplacement(Location1, 12, "x\ny\n"));
88 Replacement Replace2(createReplacement(Location2, 1, "f"));
94 Replacement Replace("nonexistent-file.cpp", 0, 1, "");
99 Replacement Replace("/path/to/file.cpp", 0, 1, "");
104 Replacement Replace1(Context.Sources, SourceLocation(), 0, "");
107 Replacement Replace2;
115 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
117 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 3, 1),
129 std::vector<Replacement> Replaces;
130 Replaces.push_back(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
133 Replacement(Context.Sources, Context.getLocation(ID, 3, 1), 5, "other"));
142 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
144 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
146 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
158 Replaces.insert(Replacement(Context.Sources, Context.getLocation(IDa, 1, 1),
160 Replaces.insert(Replacement(Context.Sources, SourceLocation(),
162 Replaces.insert(Replacement(Context.Sources, Context.getLocation(IDz, 1, 1),
171 Replaces.insert(Replacement("", 0, 1, ""));
172 Replaces.insert(Replacement("", 4, 3, " "));
189 std::vector<Replacement> Replaces;
190 Replaces.push_back(Replacement("", 0, 1, ""));
191 Replaces.push_back(Replacement("", 4, 3, " "));
206 Replaces.insert(Replacement("", 4, 0, "\"\n\""));
266 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
315 void expectReplacementAt(const Replacement &Replace,
327 Replace = Replacement(*SM, Record, "");
331 Replacement Replace;
334 TEST(Replacement, CanBeConstructedFromNode) {
340 TEST(Replacement, ReplacesAtSpellingLocation) {
350 Replace = Replacement(*SM, Call, "");
354 Replacement Replace;
357 TEST(Replacement, FunctionCall) {
363 TEST(Replacement, TemplatedFunctionCall) {
387 std::vector<Replacement> Input;
388 Input.push_back(Replacement("fileA", 50, 0, " foo "));
389 Input.push_back(Replacement("fileA", 10, 3, " bar "));
390 Input.push_back(Replacement("fileA", 10, 2, " bar ")); // Length differs
391 Input.push_back(Replacement("fileA", 9, 3, " bar ")); // Offset differs
392 Input.push_back(Replacement("fileA", 50, 0, " foo ")); // Duplicate
393 Input.push_back(Replacement("fileA", 51, 3, " bar "));
394 Input.push_back(Replacement("fileB", 51, 3, " bar ")); // Filename differs!
395 Input.push_back(Replacement("fileA", 51, 3, " moo ")); // Replacement text
398 std::vector<Replacement> Expected;
399 Expected.push_back(Replacement("fileA", 9, 3, " bar "));
400 Expected.push_back(Replacement("fileA", 10, 2, " bar "));
401 Expected.push_back(Replacement("fileA", 10, 3, " bar "));
402 Expected.push_back(Replacement("fileA", 50, 0, " foo "));
403 Expected.push_back(Replacement("fileA", 51, 3, " bar "));
404 Expected.push_back(Replacement("fileA", 51, 3, " moo "));
405 Expected.push_back(Replacement("fileB", 51, 3, " bar "));
415 std::vector<Replacement> Input;
416 Input.push_back(Replacement("fileA", 0, 5, " foo "));
417 Input.push_back(Replacement("fileA", 0, 5, " foo ")); // Duplicate not a
419 Replacement("fileA", 2, 6, " bar "));
420 Input.push_back(Replacement("fileA", 7, 3, " moo "));
433 std::vector<Replacement> Input;
437 Input.push_back(Replacement("fileA", 0, 5, " foo ")); // 0
438 Input.push_back(Replacement("fileA", 5, 5, " bar ")); // 1
439 Input.push_back(Replacement("fileA", 6, 0, " bar ")); // 3
440 Input.push_back(Replacement("fileA", 5, 5, " moo ")); // 2
441 Input.push_back(Replacement("fileA", 7, 2, " bar ")); // 4
442 Input.push_back(Replacement("fileA", 15, 5, " golf ")); // 5
443 Input.push_back(Replacement("fileA", 16, 5, " bag ")); // 6
444 Input.push_back(Replacement("fileA", 10, 3, " club ")); // 7
447 // Replacement. #4 ensures #3 hasn't messed up the conflicting range size.