diff options
author | Daniel Jasper <djasper@google.com> | 2015-01-04 20:40:51 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-01-04 20:40:51 +0000 |
commit | 3684c2d854d6009f0175f533d409eb383521a59b (patch) | |
tree | 4dd2b7efd20f9875d113948ea492ff2c0ac59e69 /unittests | |
parent | 0046ba3a66c1cb9f79054e9f1a831f86d122f899 (diff) |
clang-format: [Java] Fix incorrect recognition of annonymous classes.
Before:
someFunction(new Runnable() { public void run() { System.out.println(42);
}
});
After:
someFunction(new Runnable() {
public void run() {
System.out.println(42);
}
});
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTestJava.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJava.cpp b/unittests/Format/FormatTestJava.cpp index b4f67afd9b..e27e462ae7 100644 --- a/unittests/Format/FormatTestJava.cpp +++ b/unittests/Format/FormatTestJava.cpp @@ -387,6 +387,11 @@ TEST_F(FormatTestJava, FormatsInnerBlocks) { " System.out.println(42);\n" " }\n" "}, someOtherParameter);"); + verifyFormat("someFunction(new Runnable() {\n" + " public void run() {\n" + " System.out.println(42);\n" + " }\n" + "});"); verifyFormat("someObject.someFunction(\n" " new Runnable() {\n" " @Override\n" |