diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 6 |
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" |