From f95b1f454620d1d59b2a070ad2d630b3b0830a1e Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 20 Nov 2015 16:18:42 +0000 Subject: clang-format: [JS] Properly add a space after "in" in for loops. llvm-svn: 253672 --- clang/unittests/Format/FormatTestJS.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/unittests/Format/FormatTestJS.cpp') diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 9be375243c8..56a91442f9a 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -545,6 +545,11 @@ TEST_F(FormatTestJS, ReturnStatements) { "}"); } +TEST_F(FormatTestJS, ForLoops) { + verifyFormat("for (var i in [2, 3]) {\n" + "}"); +} + TEST_F(FormatTestJS, AutomaticSemicolonInsertion) { // The following statements must not wrap, as otherwise the program meaning // would change due to automatic semicolon insertion. -- cgit v1.2.3