From 71e574543f8642bc05872760e577e8aee8d096b7 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 20 Nov 2015 16:44:28 +0000 Subject: clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty" work properly. llvm-svn: 253674 --- clang/unittests/Format/FormatTestJS.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/unittests/Format/FormatTestJS.cpp') diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 56a91442f9a..d9b90ded152 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -448,6 +448,12 @@ TEST_F(FormatTestJS, InliningFunctionLiterals) { " }\n" "}", Style); + + Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty; + verifyFormat("var func = function() {\n" + " return 1;\n" + "};", + Style); } TEST_F(FormatTestJS, MultipleFunctionLiterals) { -- cgit v1.2.3