summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-11-20 16:44:28 +0000
committerDaniel Jasper <djasper@google.com>2015-11-20 16:44:28 +0000
commit71e574543f8642bc05872760e577e8aee8d096b7 (patch)
tree2b9298d5cb38ae9ca630078fa5cd2329cc43248f /clang/unittests/Format/FormatTestJS.cpp
parent43db5b7daa846d94261f5d574a2f337b6f30deb0 (diff)
downloadbcm5719-llvm-71e574543f8642bc05872760e577e8aee8d096b7.tar.gz
bcm5719-llvm-71e574543f8642bc05872760e577e8aee8d096b7.zip
clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
work properly. llvm-svn: 253674
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp6
1 files changed, 6 insertions, 0 deletions
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) {
OpenPOWER on IntegriCloud