diff options
Diffstat (limited to 'unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | unittests/Format/FormatTestJS.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp index 6f494db71d156..90c99317bd79c 100644 --- a/unittests/Format/FormatTestJS.cpp +++ b/unittests/Format/FormatTestJS.cpp @@ -377,6 +377,16 @@ TEST_F(FormatTestJS, AmbientDeclarations) { "declare function\n" "x();", // TODO(martinprobst): should ideally be indented. NineCols); + verifyFormat("declare function foo();\n" + "let x = 1;\n"); + verifyFormat("declare function foo(): string;\n" + "let x = 1;\n"); + verifyFormat("declare function foo(): {x: number};\n" + "let x = 1;\n"); + verifyFormat("declare class X {}\n" + "let x = 1;\n"); + verifyFormat("declare interface Y {}\n" + "let x = 1;\n"); verifyFormat( "declare enum X {\n" "}", |