]> granicus.if.org Git - clang/commitdiff
[test] Delete trailing spaces from YAML tests
authorFangrui Song <maskray@google.com>
Fri, 12 Jul 2019 05:59:28 +0000 (05:59 +0000)
committerFangrui Song <maskray@google.com>
Fri, 12 Jul 2019 05:59:28 +0000 (05:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365873 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Tooling/DiagnosticsYamlTest.cpp
unittests/Tooling/RefactoringActionRulesTest.cpp
unittests/Tooling/RefactoringTest.cpp
unittests/Tooling/ReplacementsYamlTest.cpp

index aaba2589111f70f6dcc2c64ae10adce6a5ae0975..334c31732223665a5b59cf8d2f9cadeca5c2fb26 100644 (file)
@@ -42,34 +42,34 @@ static Diagnostic makeDiagnostic(StringRef DiagnosticName,
 static const char *YAMLContent =
     "---\n"
     "MainSourceFile:  'path/to/source.cpp'\n"
-    "Diagnostics:     \n"
+    "Diagnostics:\n"
     "  - DiagnosticName:  'diagnostic#1\'\n"
-    "    DiagnosticMessage: \n"
+    "    DiagnosticMessage:\n"
     "      Message:         'message #1'\n"
     "      FilePath:        'path/to/source.cpp'\n"
     "      FileOffset:      55\n"
-    "      Replacements:    \n"
+    "      Replacements:\n"
     "        - FilePath:        'path/to/source.cpp'\n"
     "          Offset:          100\n"
     "          Length:          12\n"
     "          ReplacementText: 'replacement #1'\n"
     "  - DiagnosticName:  'diagnostic#2'\n"
-    "    DiagnosticMessage: \n"
+    "    DiagnosticMessage:\n"
     "      Message:         'message #2'\n"
     "      FilePath:        'path/to/header.h'\n"
     "      FileOffset:      60\n"
-    "      Replacements:    \n"
+    "      Replacements:\n"
     "        - FilePath:        'path/to/header.h'\n"
     "          Offset:          62\n"
     "          Length:          2\n"
     "          ReplacementText: 'replacement #2'\n"
     "  - DiagnosticName:  'diagnostic#3'\n"
-    "    DiagnosticMessage: \n"
+    "    DiagnosticMessage:\n"
     "      Message:         'message #3'\n"
     "      FilePath:        'path/to/source2.cpp'\n"
     "      FileOffset:      72\n"
     "      Replacements:    []\n"
-    "    Notes:           \n"
+    "    Notes:\n"
     "      - Message:         Note1\n"
     "        FilePath:        'path/to/note1.cpp'\n"
     "        FileOffset:      88\n"
index 7daef33337bd075abff5b79b1c971e4fdea766b4..b471cf207cff1883f553c9ebd691e0bbd7e72bae 100644 (file)
@@ -118,7 +118,7 @@ TEST_F(RefactoringActionRulesTest, MyFirstRefactoringRule) {
                  "Error:           ''\n"
                  "InsertedHeaders: []\n"
                  "RemovedHeaders:  []\n"
-                 "Replacements:    \n" // Extra whitespace here!
+                 "Replacements:\n"
                  "  - FilePath:        input.cpp\n"
                  "    Offset:          30\n"
                  "    Length:          1\n"
index ed111b787835be6572f0fbbc0345bf01931b3d03..c51d738ba6625ad57cdfd370defb756818c7ebf1 100644 (file)
@@ -1122,11 +1122,11 @@ TEST_F(AtomicChangeTest, AtomicChangeToYAML) {
                "Key:             'input.cpp:20'\n"
                "FilePath:        input.cpp\n"
                "Error:           ''\n"
-               "InsertedHeaders: \n" // Extra whitespace here!
+               "InsertedHeaders:\n"
                "  - a.h\n"
-               "RemovedHeaders:  \n" // Extra whitespace here!
+               "RemovedHeaders:\n"
                "  - b.h\n"
-               "Replacements:    \n" // Extra whitespace here!
+               "Replacements:\n"
                "  - FilePath:        input.cpp\n"
                "    Offset:          20\n"
                "    Length:          0\n"
@@ -1144,11 +1144,11 @@ TEST_F(AtomicChangeTest, YAMLToAtomicChange) {
                             "Key:             'input.cpp:20'\n"
                             "FilePath:        input.cpp\n"
                             "Error:           'ok'\n"
-                            "InsertedHeaders: \n" // Extra whitespace here!
+                            "InsertedHeaders:\n"
                             "  - a.h\n"
-                            "RemovedHeaders:  \n" // Extra whitespace here!
+                            "RemovedHeaders:\n"
                             "  - b.h\n"
-                            "Replacements:    \n" // Extra whitespace here!
+                            "Replacements:\n"
                             "  - FilePath:        input.cpp\n"
                             "    Offset:          20\n"
                             "    Length:          0\n"
index e05a7fd5919b21d4f019fd54ce527647040846bd..c8fe9c4db412b256fa6f99efc502287288b1664e 100644 (file)
@@ -33,7 +33,7 @@ TEST(ReplacementsYamlTest, serializesReplacements) {
   // NOTE: If this test starts to fail for no obvious reason, check whitespace.
   ASSERT_STREQ("---\n"
                "MainSourceFile:  '/path/to/source.cpp'\n"
-               "Replacements:    \n" // Extra whitespace here!
+               "Replacements:\n"
                "  - FilePath:        '/path/to/file1.h'\n"
                "    Offset:          232\n"
                "    Length:          56\n"
@@ -61,7 +61,7 @@ TEST(ReplacementsYamlTest, serializesNewLines) {
   // NOTE: If this test starts to fail for no obvious reason, check whitespace.
   ASSERT_STREQ("---\n"
                "MainSourceFile:  '/path/to/source.cpp'\n"
-               "Replacements:    \n" // Extra whitespace here!
+               "Replacements:\n"
                "  - FilePath:        '/path/to/file1.h'\n"
                "    Offset:          0\n"
                "    Length:          0\n"