aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJava.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp
index b99dec7..10149f5 100644
--- a/clang/unittests/Format/FormatTestJava.cpp
+++ b/clang/unittests/Format/FormatTestJava.cpp
@@ -69,6 +69,21 @@ TEST_F(FormatTestJava, FormatsInstanceOfLikeOperators) {
Style);
}
+TEST_F(FormatTestJava, Chromium) {
+ verifyFormat("class SomeClass {\n"
+ " void f() {}\n"
+ " int g() {\n"
+ " return 0;\n"
+ " }\n"
+ " void h() {\n"
+ " while (true) f();\n"
+ " for (;;) f();\n"
+ " if (true) f();\n"
+ " }\n"
+ "}",
+ getChromiumStyle(FormatStyle::LK_Java));
+}
+
TEST_F(FormatTestJava, ClassKeyword) {
verifyFormat("SomeClass.class.getName();");
verifyFormat("Class c = SomeClass.class;");