summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2018-01-19 16:18:47 +0000
committerKrasimir Georgiev <krasimir@google.com>2018-01-19 16:18:47 +0000
commit412ed095f79b93cb63687150b292a1089a8c9854 (patch)
tree26ba2bd73730e134383f5e29cb13e0c261fe0828 /clang/unittests/Format/FormatTest.cpp
parent33cb84571f088f12154b7a86bd3d327de4bab269 (diff)
downloadbcm5719-llvm-412ed095f79b93cb63687150b292a1089a8c9854.tar.gz
bcm5719-llvm-412ed095f79b93cb63687150b292a1089a8c9854.zip
[clang-format] Adds a canonical delimiter to raw string formatting
Summary: This patch adds canonical delimiter support to the raw string formatting. This allows matching delimiters to be updated to the canonical one. Reviewers: bkramer Reviewed By: bkramer Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42187 llvm-svn: 322956
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index ac5184ef02b..dcb1089a82c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -10429,13 +10429,15 @@ TEST_F(FormatTest, ParsesConfiguration) {
FormatStyle::LK_TextProto,
{"pb", "proto"},
{"PARSE_TEXT_PROTO"},
+ /*CanonicalDelimiter=*/"",
"llvm",
},
{
FormatStyle::LK_Cpp,
{"cc", "cpp"},
{"C_CODEBLOCK", "CPPEVAL"},
- "",
+ /*CanonicalDelimiter=*/"cc",
+ /*BasedOnStyle=*/"",
},
};
@@ -10453,7 +10455,8 @@ TEST_F(FormatTest, ParsesConfiguration) {
" - 'cpp'\n"
" EnclosingFunctions:\n"
" - 'C_CODEBLOCK'\n"
- " - 'CPPEVAL'\n",
+ " - 'CPPEVAL'\n"
+ " CanonicalDelimiter: 'cc'",
RawStringFormats, ExpectedRawStringFormats);
}
OpenPOWER on IntegriCloud