aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-10-15 16:03:01 +0000
committerNico Weber <nicolasweber@gmx.de>2015-10-15 16:03:01 +0000
commit2cd92f1cc789a7570893f5e72cd8fa3330da4ebf (patch)
tree20aa34cefdcf0e963a9bcb602a4af0d53dd7206b /clang/unittests/Format/FormatTestJava.cpp
parentaa19708f88e4f8444d59e8250796610712026c1b (diff)
downloadllvm-2cd92f1cc789a7570893f5e72cd8fa3330da4ebf.zip
llvm-2cd92f1cc789a7570893f5e72cd8fa3330da4ebf.tar.gz
llvm-2cd92f1cc789a7570893f5e72cd8fa3330da4ebf.tar.bz2
clang-format/java: Break after annotations on fields in Chromium style.
Chromium follows the Android style guide for Java code, and that doesn't make the distinction between fields and non-fields that the Google Java style guide makes: https://source.android.com/source/code-style.html#use-standard-java-annotations https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations llvm-svn: 250422
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJava.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp
index 6365fe4..160c220 100644
--- a/clang/unittests/Format/FormatTestJava.cpp
+++ b/clang/unittests/Format/FormatTestJava.cpp
@@ -276,6 +276,10 @@ TEST_F(FormatTestJava, Annotations) {
verifyFormat("void SomeFunction(@org.llvm.Nullable String something) {}");
verifyFormat("@Partial @Mock DataLoader loader;");
+ verifyFormat("@Partial\n"
+ "@Mock\n"
+ "DataLoader loader;",
+ getChromiumStyle(FormatStyle::LK_Java));
verifyFormat("@SuppressWarnings(value = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\")\n"
"public static int iiiiiiiiiiiiiiiiiiiiiiii;");