summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 2f1ba5bc146..cbfa2a33205 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -755,6 +755,12 @@ TEST_F(FormatTestJS, ClassDeclarations) {
" aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaaaa):\n"
" aaaaaaaaaaaaaaaaaaaaaa {}\n"
"}");
+ verifyFormat("foo = class Name {\n"
+ " constructor() {}\n"
+ "};");
+ verifyFormat("foo = class {\n"
+ " constructor() {}\n"
+ "};");
// ':' is not a type declaration here.
verifyFormat("class X {\n"
OpenPOWER on IntegriCloud