summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-05-19 07:27:02 +0000
committerDaniel Jasper <djasper@google.com>2014-05-19 07:27:02 +0000
commit78214397a37539174ea0b984a0b2b8ba3d85c32e (patch)
treeb65534f4cdf298ca3ea2c323e3c94c2e07ec44bd /clang/unittests/Format/FormatTestJS.cpp
parent993a906af3893bd88d5f9b175223cca73c4531fa (diff)
downloadbcm5719-llvm-78214397a37539174ea0b984a0b2b8ba3d85c32e.tar.gz
bcm5719-llvm-78214397a37539174ea0b984a0b2b8ba3d85c32e.zip
clang-format: [JS] Support for EC6 arrow functions.
Before: var b = a.map((x) = > x + 1); After: var b = a.map((x) => x + 1); llvm-svn: 209112
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 7a853b03781..c10dc9675f4 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -77,6 +77,8 @@ TEST_F(FormatTestJS, UnderstandsJavaScriptOperators) {
" bbbbbb :\n"
" ccc;",
getGoogleJSStyleWithColumns(20));
+
+ verifyFormat("var b = a.map((x) => x + 1);");
}
TEST_F(FormatTestJS, SpacesInContainerLiterals) {
OpenPOWER on IntegriCloud