diff options
author | Martin Probst <martin@probst.io> | 2017-08-01 17:12:15 +0000 |
---|---|---|
committer | Martin Probst <martin@probst.io> | 2017-08-01 17:12:15 +0000 |
commit | db51cc5745f4634cac1d6cad9ef40663b35f468d (patch) | |
tree | 7ef1acc28e6d8f6bc11ff6e4abf42dc54ead4018 /clang/unittests/Format/FormatTestJS.cpp | |
parent | 2b89c14b8ced606c4891797ee7cf127bd2ce008b (diff) | |
download | bcm5719-llvm-db51cc5745f4634cac1d6cad9ef40663b35f468d.tar.gz bcm5719-llvm-db51cc5745f4634cac1d6cad9ef40663b35f468d.zip |
clang-format: [JS] consistenly format enums.
Summary: Previously, const enums would get formatted differently because the modifier was not recognized.
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D36144
llvm-svn: 309703
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 d91df54f3da..54e2c8fbe95 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -1425,6 +1425,14 @@ TEST_F(FormatTestJS, EnumDeclarations) { " B\n" "}\n" "var x = 1;"); + verifyFormat("const enum Foo {\n" + " A = 1,\n" + " B\n" + "}"); + verifyFormat("export const enum Foo {\n" + " A = 1,\n" + " B\n" + "}"); } TEST_F(FormatTestJS, MetadataAnnotations) { |