clang-format: [JS] Don't indent in goog.scope blocks.
Before:
goog.scope(function() {
var x = a.b;
var y = c.d;
}); // goog.scope
After:
goog.scope(function() {
var x = a.b;
var y = c.d;
}); // goog.scope
llvm-svn: 208088
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index e7ca14f..4e89086 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -91,5 +91,12 @@
verifyFormat("this.function('', true);");
}
+TEST_F(FormatTestJS, GoogScopes) {
+ verifyFormat("goog.scope(function() {\n"
+ "var x = a.b;\n"
+ "var y = c.d;\n"
+ "}); // goog.scope");
+}
+
} // end namespace tooling
} // end namespace clang