This repository was archived by the owner on Nov 1, 2021. It is now read-only.
File tree 1 file changed +28
-20
lines changed
1 file changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -1513,17 +1513,21 @@ TEST_F(ApplyAtomicChangesTest, InsertsNewIncludesInRightOrder) {
1513
1513
}
1514
1514
1515
1515
TEST_F (ApplyAtomicChangesTest, RemoveAndSortIncludes) {
1516
- setInput (" #include \" a\"\n "
1517
- " #include \" b\"\n "
1518
- " #include \" c\"\n "
1519
- " \n "
1520
- " int a;" );
1516
+ setInput (R"(
1517
+ #include "a"
1518
+ #include "b"
1519
+ #include "c"
1520
+
1521
+ int a;
1522
+ )" );
1521
1523
Changes.emplace_back (FilePath, " key1" );
1522
1524
Changes.back ().removeHeader (" b" );
1523
- EXPECT_EQ (" #include \" a\"\n "
1524
- " #include \" c\"\n "
1525
- " \n "
1526
- " int a;" ,
1525
+ EXPECT_EQ (R"(
1526
+ #include "a"
1527
+ #include "c"
1528
+
1529
+ int a;
1530
+ )" ,
1527
1531
rewrite ());
1528
1532
}
1529
1533
TEST_F (ApplyAtomicChangesTest, InsertsSystemIncludes) {
@@ -1549,19 +1553,23 @@ TEST_F(ApplyAtomicChangesTest, InsertsSystemIncludes) {
1549
1553
}
1550
1554
1551
1555
TEST_F (ApplyAtomicChangesTest, RemoveSystemIncludes) {
1552
- setInput (" #include <a>\n "
1553
- " #include <b>\n "
1554
- " \n "
1555
- " #include \" c\" "
1556
- " \n "
1557
- " int a;" );
1556
+ setInput (R"(
1557
+ #include <a>
1558
+ #include <b>
1559
+
1560
+ #include "c"
1561
+
1562
+ int a;
1563
+ )" );
1558
1564
Changes.emplace_back (FilePath, " key1" );
1559
1565
Changes.back ().removeHeader (" <a>" );
1560
- EXPECT_EQ (" #include <b>\n "
1561
- " \n "
1562
- " #include \" c\" "
1563
- " \n "
1564
- " int a;" ,
1566
+ EXPECT_EQ (R"(
1567
+ #include <b>
1568
+
1569
+ #include "c"
1570
+
1571
+ int a;
1572
+ )" ,
1565
1573
rewrite ());
1566
1574
}
1567
1575
You can’t perform that action at this time.
0 commit comments