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.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 0a5c991b36d..1d610555778 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1164,7 +1164,15 @@ TEST_F(FormatTestJS, WrapRespectsAutomaticSemicolonInsertion) {
verifyFormat("await theReckoning;", getGoogleJSStyleWithColumns(10));
verifyFormat("some['a']['b']", getGoogleJSStyleWithColumns(10));
verifyFormat("x = (a['a']\n"
- " ['b']);", getGoogleJSStyleWithColumns(10));
+ " ['b']);",
+ getGoogleJSStyleWithColumns(10));
+ verifyFormat("function f() {\n"
+ " return foo.bar(\n"
+ " (param): param is {\n"
+ " a: SomeType\n"
+ " }&ABC => 1)\n"
+ "}",
+ getGoogleJSStyleWithColumns(25));
}
TEST_F(FormatTestJS, AutomaticSemicolonInsertionHeuristic) {
OpenPOWER on IntegriCloud