summaryrefslogtreecommitdiff
path: root/unittests/Tooling/RefactoringTest.cpp
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2017-03-28 13:56:19 +0000
committerEric Liu <ioeric@google.com>2017-03-28 13:56:19 +0000
commit9dcb677ec48dff55f5e1b18a1ed3be5fdedb450c (patch)
treef60b28bdbda45bb54e0d4072fb5f941e59f5c785 /unittests/Tooling/RefactoringTest.cpp
parentad6a872e1eec659fc23ec6b1a7db1a6235aed2c9 (diff)
downloadclang-9dcb677ec48dff55f5e1b18a1ed3be5fdedb450c.tar.gz
Try to unbreak buildbots after r298913.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling/RefactoringTest.cpp')
-rw-r--r--unittests/Tooling/RefactoringTest.cpp48
1 files changed, 20 insertions, 28 deletions
diff --git a/unittests/Tooling/RefactoringTest.cpp b/unittests/Tooling/RefactoringTest.cpp
index 7ac5a1d0d4..080a00330b 100644
--- a/unittests/Tooling/RefactoringTest.cpp
+++ b/unittests/Tooling/RefactoringTest.cpp
@@ -1513,21 +1513,17 @@ TEST_F(ApplyAtomicChangesTest, InsertsNewIncludesInRightOrder) {
}
TEST_F(ApplyAtomicChangesTest, RemoveAndSortIncludes) {
- setInput(R"(
-#include "a"
-#include "b"
-#include "c"
-
-int a;
- )");
+ setInput("#include \"a\"\n"
+ "#include \"b\"\n"
+ "#include \"c\"\n"
+ "\n"
+ "int a;");
Changes.emplace_back(FilePath, "key1");
Changes.back().removeHeader("b");
- EXPECT_EQ(R"(
-#include "a"
-#include "c"
-
-int a;
- )",
+ EXPECT_EQ("#include \"a\"\n"
+ "#include \"c\"\n"
+ "\n"
+ "int a;",
rewrite());
}
TEST_F(ApplyAtomicChangesTest, InsertsSystemIncludes) {
@@ -1553,23 +1549,19 @@ TEST_F(ApplyAtomicChangesTest, InsertsSystemIncludes) {
}
TEST_F(ApplyAtomicChangesTest, RemoveSystemIncludes) {
- setInput(R"(
-#include <a>
-#include <b>
-
-#include "c"
-
-int a;
- )");
+ setInput("#include <a>\n"
+ "#include <b>\n"
+ "\n"
+ "#include \"c\""
+ "\n"
+ "int a;");
Changes.emplace_back(FilePath, "key1");
Changes.back().removeHeader("<a>");
- EXPECT_EQ(R"(
-#include <b>
-
-#include "c"
-
-int a;
- )",
+ EXPECT_EQ("#include <b>\n"
+ "\n"
+ "#include \"c\""
+ "\n"
+ "int a;",
rewrite());
}