r365873 - [test] Delete trailing spaces from YAML tests
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 11 22:59:28 PDT 2019
Author: maskray
Date: Thu Jul 11 22:59:28 2019
New Revision: 365873
URL: http://llvm.org/viewvc/llvm-project?rev=365873&view=rev
Log:
[test] Delete trailing spaces from YAML tests
Modified:
cfe/trunk/unittests/Tooling/DiagnosticsYamlTest.cpp
cfe/trunk/unittests/Tooling/RefactoringActionRulesTest.cpp
cfe/trunk/unittests/Tooling/RefactoringTest.cpp
cfe/trunk/unittests/Tooling/ReplacementsYamlTest.cpp
Modified: cfe/trunk/unittests/Tooling/DiagnosticsYamlTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/DiagnosticsYamlTest.cpp?rev=365873&r1=365872&r2=365873&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/DiagnosticsYamlTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/DiagnosticsYamlTest.cpp Thu Jul 11 22:59:28 2019
@@ -42,34 +42,34 @@ static Diagnostic makeDiagnostic(StringR
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"
Modified: cfe/trunk/unittests/Tooling/RefactoringActionRulesTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RefactoringActionRulesTest.cpp?rev=365873&r1=365872&r2=365873&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RefactoringActionRulesTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/RefactoringActionRulesTest.cpp Thu Jul 11 22:59:28 2019
@@ -118,7 +118,7 @@ TEST_F(RefactoringActionRulesTest, MyFir
"Error: ''\n"
"InsertedHeaders: []\n"
"RemovedHeaders: []\n"
- "Replacements: \n" // Extra whitespace here!
+ "Replacements:\n"
" - FilePath: input.cpp\n"
" Offset: 30\n"
" Length: 1\n"
Modified: cfe/trunk/unittests/Tooling/RefactoringTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RefactoringTest.cpp?rev=365873&r1=365872&r2=365873&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RefactoringTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/RefactoringTest.cpp Thu Jul 11 22:59:28 2019
@@ -1122,11 +1122,11 @@ TEST_F(AtomicChangeTest, AtomicChangeToY
"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, YAMLToAtomicCha
"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"
Modified: cfe/trunk/unittests/Tooling/ReplacementsYamlTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/ReplacementsYamlTest.cpp?rev=365873&r1=365872&r2=365873&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/ReplacementsYamlTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/ReplacementsYamlTest.cpp Thu Jul 11 22:59:28 2019
@@ -33,7 +33,7 @@ TEST(ReplacementsYamlTest, serializesRep
// 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, serializesNew
// 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"
More information about the cfe-commits
mailing list