diff options
author | Jonathan Coe <jbcoe@google.com> | 2020-03-31 18:41:39 +0100 |
---|---|---|
committer | Jonathan Coe <jbcoe@google.com> | 2020-03-31 19:27:01 +0100 |
commit | d1b412ae389e4e30706c326ddec192ffb2e272cf (patch) | |
tree | cace1aae83db1ebd992137014ac157a42575d9bc /clang/unittests/Format/FormatTestCSharp.cpp | |
parent | 38aebe5c04ab4cb3695dc1bcc60b9a7b55215aff (diff) | |
download | llvm-d1b412ae389e4e30706c326ddec192ffb2e272cf.zip llvm-d1b412ae389e4e30706c326ddec192ffb2e272cf.tar.gz llvm-d1b412ae389e4e30706c326ddec192ffb2e272cf.tar.bz2 |
[clang-format] Correct line breaks in C# generic type constraints
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D77064
Diffstat (limited to 'clang/unittests/Format/FormatTestCSharp.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestCSharp.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTestCSharp.cpp b/clang/unittests/Format/FormatTestCSharp.cpp index f5e0bab..b0e4e76 100644 --- a/clang/unittests/Format/FormatTestCSharp.cpp +++ b/clang/unittests/Format/FormatTestCSharp.cpp @@ -564,7 +564,7 @@ var myDict = new Dictionary<string, string> { TEST_F(FormatTestCSharp, CSharpArrayInitializers) { FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); - + verifyFormat(R"(// private MySet<Node>[] setPoints = { new Point<Node>(), @@ -710,6 +710,15 @@ class ItemFactory<T> IAnotherInterfaceStill<T> {})", Style); + Style.ColumnLimit = 50; // Force lines to be wrapped. + verifyFormat(R"(// +class ItemFactory<T, U> + where T : new(), + IAnInterface<T>, + IAnotherInterface<T, U>, + IAnotherInterfaceStill<T, U> {})", + Style); + // In other languages `where` can be used as a normal identifier. // This example is in C++! verifyFormat(R"(// |