diff options
| author | Zachary Turner <zturner@google.com> | 2018-10-12 16:24:09 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2018-10-12 16:24:09 +0000 |
| commit | ec234052a648d69c4a253dd0b95a9686855e3757 (patch) | |
| tree | 229ee75795d586e7e7d8f49238a6ce903a1f273b /clang | |
| parent | 9bfe91da3d2c2eb3f0cba9dc587a51ddbbf4d8ac (diff) | |
| download | bcm5719-llvm-ec234052a648d69c4a253dd0b95a9686855e3757.tar.gz bcm5719-llvm-ec234052a648d69c4a253dd0b95a9686855e3757.zip | |
Make YAML quote forward slashes.
llvm-svn: 344357
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/unittests/Tooling/DiagnosticsYamlTest.cpp | 12 | ||||
| -rw-r--r-- | clang/unittests/Tooling/ReplacementsYamlTest.cpp | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/clang/unittests/Tooling/DiagnosticsYamlTest.cpp b/clang/unittests/Tooling/DiagnosticsYamlTest.cpp index 83e09eaeef2..18284bd9957 100644 --- a/clang/unittests/Tooling/DiagnosticsYamlTest.cpp +++ b/clang/unittests/Tooling/DiagnosticsYamlTest.cpp @@ -58,30 +58,30 @@ TEST(DiagnosticsYamlTest, serializesDiagnostics) { YAML << TUD; EXPECT_EQ("---\n" - "MainSourceFile: path/to/source.cpp\n" + "MainSourceFile: 'path/to/source.cpp'\n" "Diagnostics: \n" " - DiagnosticName: 'diagnostic#1\'\n" " Message: 'message #1'\n" " FileOffset: 55\n" - " FilePath: path/to/source.cpp\n" + " FilePath: 'path/to/source.cpp'\n" " Replacements: \n" - " - FilePath: path/to/source.cpp\n" + " - FilePath: 'path/to/source.cpp'\n" " Offset: 100\n" " Length: 12\n" " ReplacementText: 'replacement #1'\n" " - DiagnosticName: 'diagnostic#2'\n" " Message: 'message #2'\n" " FileOffset: 60\n" - " FilePath: path/to/header.h\n" + " FilePath: 'path/to/header.h'\n" " Replacements: \n" - " - FilePath: path/to/header.h\n" + " - FilePath: 'path/to/header.h'\n" " Offset: 62\n" " Length: 2\n" " ReplacementText: 'replacement #2'\n" " - DiagnosticName: 'diagnostic#3'\n" " Message: 'message #3'\n" " FileOffset: 72\n" - " FilePath: path/to/source2.cpp\n" + " FilePath: 'path/to/source2.cpp'\n" " Replacements: \n" "...\n", YamlContentStream.str()); diff --git a/clang/unittests/Tooling/ReplacementsYamlTest.cpp b/clang/unittests/Tooling/ReplacementsYamlTest.cpp index 3e4193d2adf..2e5a87a931d 100644 --- a/clang/unittests/Tooling/ReplacementsYamlTest.cpp +++ b/clang/unittests/Tooling/ReplacementsYamlTest.cpp @@ -33,13 +33,13 @@ 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" + "MainSourceFile: '/path/to/source.cpp'\n" "Replacements: \n" // Extra whitespace here! - " - FilePath: /path/to/file1.h\n" + " - FilePath: '/path/to/file1.h'\n" " Offset: 232\n" " Length: 56\n" " ReplacementText: 'replacement #1'\n" - " - FilePath: /path/to/file2.h\n" + " - FilePath: '/path/to/file2.h'\n" " Offset: 301\n" " Length: 2\n" " ReplacementText: 'replacement #2'\n" |

