aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestCSharp.cpp
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2020-04-30 09:11:54 -0700
committerAaron Smith <aaron.smith@microsoft.com>2020-04-30 09:11:54 -0700
commit292058a5d6d708ec7d285a452d4350b33ba080dc (patch)
treef8647a4e747ed00c100ca07305d3b8265e3323cd /clang/unittests/Format/FormatTestCSharp.cpp
parent2fd7d364cd999c743b5bdefa7ee9e5630f3564ad (diff)
downloadllvm-292058a5d6d708ec7d285a452d4350b33ba080dc.zip
llvm-292058a5d6d708ec7d285a452d4350b33ba080dc.tar.gz
llvm-292058a5d6d708ec7d285a452d4350b33ba080dc.tar.bz2
[clang-format] Fix Microsoft style for enums
Summary: Before this change enums were formatted incorrectly for the Microsoft style. [C++ Example] enum { one, two } three, four; [Incorrectly Formatted] enum { one, two } three, four; [Correct Format with Patch] enum { one, two } three, four; Reviewers: jbcoe, MyDeveloperDay, rnk Reviewed By: MyDeveloperDay Subscribers: cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D78982
Diffstat (limited to 'clang/unittests/Format/FormatTestCSharp.cpp')
-rw-r--r--clang/unittests/Format/FormatTestCSharp.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTestCSharp.cpp b/clang/unittests/Format/FormatTestCSharp.cpp
index 91962ef..4036790 100644
--- a/clang/unittests/Format/FormatTestCSharp.cpp
+++ b/clang/unittests/Format/FormatTestCSharp.cpp
@@ -343,7 +343,13 @@ TEST_F(FormatTestCSharp, CSharpRegions) {
}
TEST_F(FormatTestCSharp, CSharpKeyWordEscaping) {
- verifyFormat("public enum var { none, @string, bool, @enum }");
+ verifyFormat("public enum var\n"
+ "{\n"
+ " none,\n"
+ " @string,\n"
+ " bool,\n"
+ " @enum\n"
+ "}");
}
TEST_F(FormatTestCSharp, CSharpNullCoalescing) {