From aa803409c3bd3930126db630c29f63d42f255153 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 22 May 2017 19:43:45 +0000 Subject: Vendor import of clang trunk r303571: https://llvm.org/svn/llvm-project/cfe/trunk@303571 --- unittests/Format/FormatTestJS.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'unittests/Format/FormatTestJS.cpp') diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp index ff28f304be994..ba6ff02360851 100644 --- a/unittests/Format/FormatTestJS.cpp +++ b/unittests/Format/FormatTestJS.cpp @@ -548,15 +548,14 @@ TEST_F(FormatTestJS, AsyncFunctions) { " // Comment.\n" " return async.then();\n" "}\n"); - verifyFormat("for async (const x of y) {\n" + verifyFormat("for await (const x of y) {\n" " console.log(x);\n" "}\n"); verifyFormat("function asyncLoop() {\n" - " for async (const x of y) {\n" + " for await (const x of y) {\n" " console.log(x);\n" " }\n" "}\n"); - } TEST_F(FormatTestJS, FunctionParametersTrailingComma) { @@ -1824,6 +1823,11 @@ TEST_F(FormatTestJS, NonNullAssertionOperator) { verifyFormat("let x = !foo;\n"); verifyFormat("let x = foo[0]!;\n"); verifyFormat("let x = (foo)!;\n"); + verifyFormat("let x = x(foo!);\n"); + verifyFormat( + "a.aaaaaa(a.a!).then(\n" + " x => x(x));\n", + getGoogleJSStyleWithColumns(20)); verifyFormat("let x = foo! - 1;\n"); verifyFormat("let x = {foo: 1}!;\n"); verifyFormat( -- cgit v1.2.3