• Home
  • Raw
  • Download

Lines Matching refs:Replaces

115   Replacements Replaces;  in TEST_F()  local
116 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1), in TEST_F()
118 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 3, 1), in TEST_F()
120 EXPECT_TRUE(applyAllReplacements(Replaces, Context.Rewrite)); in TEST_F()
130 std::vector<Replacement> Replaces; in TEST_F() local
131 Replaces.push_back(Replacement(Context.Sources, Context.getLocation(ID, 2, 1), in TEST_F()
133 Replaces.push_back( in TEST_F()
135 EXPECT_TRUE(applyAllReplacements(Replaces, Context.Rewrite)); in TEST_F()
142 Replacements Replaces; in TEST_F() local
143 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1), in TEST_F()
145 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1), in TEST_F()
147 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1), in TEST_F()
149 EXPECT_TRUE(applyAllReplacements(Replaces, Context.Rewrite)); in TEST_F()
158 Replacements Replaces; in TEST_F() local
159 Replaces.insert(Replacement(Context.Sources, Context.getLocation(IDa, 1, 1), in TEST_F()
161 Replaces.insert(Replacement(Context.Sources, SourceLocation(), in TEST_F()
163 Replaces.insert(Replacement(Context.Sources, Context.getLocation(IDz, 1, 1), in TEST_F()
165 EXPECT_FALSE(applyAllReplacements(Replaces, Context.Rewrite)); in TEST_F()
186 tooling::Replacements Replaces; in TEST_F() local
188 Replaces.insert(tooling::Replacement( in TEST_F()
190 Replaces.insert(tooling::Replacement( in TEST_F()
192 Replaces.insert(tooling::Replacement( in TEST_F()
194 Replaces.insert(tooling::Replacement( in TEST_F()
198 Replaces, Context.Rewrite, "{BasedOnStyle: LLVM, ColumnLimit: 20}")); in TEST_F()
204 Replacements Replaces; in TEST() local
205 Replaces.insert(Replacement("", 0, 1, "")); in TEST()
206 Replaces.insert(Replacement("", 4, 3, " ")); in TEST()
208 EXPECT_EQ(0u, shiftedCodePosition(Replaces, 0)); // |int i; in TEST()
209 EXPECT_EQ(0u, shiftedCodePosition(Replaces, 1)); // |nt i; in TEST()
210 EXPECT_EQ(1u, shiftedCodePosition(Replaces, 2)); // i|t i; in TEST()
211 EXPECT_EQ(2u, shiftedCodePosition(Replaces, 3)); // in| i; in TEST()
212 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 4)); // int| i; in TEST()
213 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 5)); // int | i; in TEST()
214 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 6)); // int |i; in TEST()
215 EXPECT_EQ(4u, shiftedCodePosition(Replaces, 7)); // int |; in TEST()
216 EXPECT_EQ(5u, shiftedCodePosition(Replaces, 8)); // int i| in TEST()
223 std::vector<Replacement> Replaces; in TEST() local
224 Replaces.push_back(Replacement("", 0, 1, "")); in TEST()
225 Replaces.push_back(Replacement("", 4, 3, " ")); in TEST()
227 EXPECT_EQ(0u, shiftedCodePosition(Replaces, 0)); // |int i; in TEST()
228 EXPECT_EQ(0u, shiftedCodePosition(Replaces, 1)); // |nt i; in TEST()
229 EXPECT_EQ(1u, shiftedCodePosition(Replaces, 2)); // i|t i; in TEST()
230 EXPECT_EQ(2u, shiftedCodePosition(Replaces, 3)); // in| i; in TEST()
231 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 4)); // int| i; in TEST()
232 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 5)); // int | i; in TEST()
233 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 6)); // int |i; in TEST()
234 EXPECT_EQ(4u, shiftedCodePosition(Replaces, 7)); // int |; in TEST()
235 EXPECT_EQ(5u, shiftedCodePosition(Replaces, 8)); // int i| in TEST()
239 Replacements Replaces; in TEST() local
240 Replaces.insert(Replacement("", 4, 0, "\"\n\"")); in TEST()
242 EXPECT_EQ(3u, shiftedCodePosition(Replaces, 3)); // "123|5678" in TEST()
243 EXPECT_EQ(7u, shiftedCodePosition(Replaces, 4)); // "1234|678" in TEST()
244 EXPECT_EQ(8u, shiftedCodePosition(Replaces, 5)); // "12345|78" in TEST()
248 Replacements Replaces; in TEST() local
250 Replaces.insert(Replacement("", 0, 4, "abcd")); in TEST()
252 EXPECT_EQ(i, shiftedCodePosition(Replaces, i)); in TEST()
308 Replacements Replaces; in TEST_F() local
309 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1), in TEST_F()
311 EXPECT_TRUE(applyAllReplacements(Replaces, Context.Rewrite)); in TEST_F()
458 Replacements Replaces; in TEST() local
459 Replaces.insert(Replacement("foo", 0, 4, "")); in TEST()
460 Replaces.insert(Replacement("foo", 10, 1, "zzzzzz")); in TEST()
461 Replaces.insert(Replacement("foo", 11, 0, "oooooooooooooooo")); in TEST()
463 std::vector<Range> Ranges = calculateChangedRanges(Replaces); in TEST()
474 Replacements Replaces = {Replacement("foo", 0, 2, "1234")}; in TEST() local
476 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
481 Replacements Replaces = {Replacement("foo", 20, 2, "1234")}; in TEST() local
483 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
488 Replacements Replaces = {Replacement("foo", 3, 2, "12"), in TEST() local
493 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
498 Replacements Replaces = {Replacement("foo", 3, 1, ""), in TEST() local
503 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
509 Replacements Replaces = { in TEST() local
514 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
519 Replacements Replaces = {Replacement("foo", 1, 15, "1234567890")}; in TEST() local
521 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
526 Replacements Replaces = { in TEST() local
530 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
535 Replacements Replaces = {Replacement("foo", 6, 1, "123"), in TEST() local
538 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
543 Replacements Replaces = {Replacement("foo", 1, 2, "123"), in TEST() local
546 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()
551 Replacements Replaces = {Replacement("foo", 1, 3, ""), in TEST() local
554 EXPECT_EQ(Expected, calculateRangesAfterReplacements(Replaces, Ranges)); in TEST()