summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-27 15:37:42 +0000
committerDaniel Jasper <djasper@google.com>2014-11-27 15:37:42 +0000
commit41368e9e073dc419f62ae016b079a7b0288e4977 (patch)
tree99332c1fd7df1053872a0642f4749cf2cf03aca5 /clang/unittests/Format/FormatTestJS.cpp
parent4087432f8b74f9f738604a064c37825dba57b7d1 (diff)
downloadbcm5719-llvm-41368e9e073dc419f62ae016b079a7b0288e4977.tar.gz
bcm5719-llvm-41368e9e073dc419f62ae016b079a7b0288e4977.zip
clang-format: [JS] Contract fewer functions to a single line.
Before: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }; After: var someVariable = function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }; llvm-svn: 222893
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index d6785649cb3..0d29c178f8b 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -232,6 +232,11 @@ TEST_F(FormatTestJS, FunctionLiterals) {
" };\n"
" }\n"
"};");
+ verifyFormat("{\n"
+ " var someVariable = function(x) {\n"
+ " return x.zIsTooLongForOneLineWithTheDeclarationLine();\n"
+ " };\n"
+ "}");
verifyFormat("var x = {a: function() { return 1; }};",
getGoogleJSStyleWithColumns(38));
OpenPOWER on IntegriCloud