diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 187b50221d1..390772db8ba 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -1674,9 +1674,15 @@ TEST_F(FormatTestJS, Modules) { " x: number;\n" " y: string;\n" "}"); - verifyFormat("export class X { y: number; }"); - verifyFormat("export abstract class X { y: number; }"); - verifyFormat("export default class X { y: number }"); + verifyFormat("export class X {\n" + " y: number;\n" + "}"); + verifyFormat("export abstract class X {\n" + " y: number;\n" + "}"); + verifyFormat("export default class X {\n" + " y: number\n" + "}"); verifyFormat("export default function() {\n return 1;\n}"); verifyFormat("export var x = 12;"); verifyFormat("class C {}\n" @@ -1698,7 +1704,9 @@ TEST_F(FormatTestJS, Modules) { "];"); verifyFormat("export default [];"); verifyFormat("export default () => {};"); - verifyFormat("export interface Foo { foo: number; }\n" + verifyFormat("export interface Foo {\n" + " foo: number;\n" + "}\n" "export class Bar {\n" " blah(): string {\n" " return this.blah;\n" |