[PATCH] clang-format: [JS] handle comments in template strings.

Daniel Jasper djasper at google.com
Mon Apr 13 08:14:56 PDT 2015


================
Comment at: unittests/Format/FormatTestJS.cpp:652
@@ +651,3 @@
+  // Comments in template strings.
+  verifyFormat("var x = `//a`;\n"
+               "var y");
----------------
I'd be slightly hesitant to use verifyFormat for any of these as that simply cops out when finding "//". Thus, tests might pass for the wrong reasons. It is probably better to use EXPECT_EQ with a manually messed up "before".

http://reviews.llvm.org/D8990

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list