diff options
author | Daniel Jasper <djasper@google.com> | 2015-06-17 09:44:07 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-06-17 09:44:07 +0000 |
commit | 9f4ec15270d8bf000d2c106b81fc4ef856e30eb8 (patch) | |
tree | 269c7609e4c40b4c718f8954ad89de9fcf508d33 /clang/unittests/Format/FormatTestJS.cpp | |
parent | 90cf380e92b98fd7c430290d245f2e94d53a767b (diff) | |
download | bcm5719-llvm-9f4ec15270d8bf000d2c106b81fc4ef856e30eb8.tar.gz bcm5719-llvm-9f4ec15270d8bf000d2c106b81fc4ef856e30eb8.zip |
clang-format: [JS] Don't put top-level typescript enums on a single line.
This makes this consistent with non-typescript enums.
Also shuffle the language-dependent stuff in mustBreakBefore to a
single location.
Patch initiated by Martin Probst.
llvm-svn: 239894
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 2911f0eb247..2c20ab058e0 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -690,6 +690,14 @@ TEST_F(FormatTestJS, InterfaceDeclarations) { TEST_F(FormatTestJS, EnumDeclarations) { verifyFormat("enum Foo {\n" + " A = 1,\n" + " B\n" + "}"); + verifyFormat("export /* somecomment*/ enum Foo {\n" + " A = 1,\n" + " B\n" + "}"); + verifyFormat("enum Foo {\n" " A = 1, // comment\n" " B\n" "}\n" |