diff options
author | Daniel Jasper <djasper@google.com> | 2014-10-17 13:36:14 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-10-17 13:36:14 +0000 |
commit | f26c755d42da1db5adcdcb082abd6ad26942d65d (patch) | |
tree | 269af2de28d63ef6ddb59395057189f96e4d6def /clang/unittests/Format | |
parent | 9758bc473b6f76e0538b60d8eab6c5fcc48cc799 (diff) | |
download | bcm5719-llvm-f26c755d42da1db5adcdcb082abd6ad26942d65d.tar.gz bcm5719-llvm-f26c755d42da1db5adcdcb082abd6ad26942d65d.zip |
clang-format: [Java] Don't break immediately after "throws".
Before:
public void doSooooooooooooooooooooooooooomething() throws
LooooooooooooooooooooooooooooongException {}
After:
public void doSooooooooooooooooooooooooooomething()
throws LooooooooooooooooooooooooooooongException {}
llvm-svn: 220041
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTestJava.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp index 4ae04e6b09e..2bca3bbe892 100644 --- a/clang/unittests/Format/FormatTestJava.cpp +++ b/clang/unittests/Format/FormatTestJava.cpp @@ -37,12 +37,6 @@ protected: return format(Code, 0, Code.size(), Style); } - static FormatStyle getGoogleJSStyleWithColumns(unsigned ColumnLimit) { - FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java); - Style.ColumnLimit = ColumnLimit; - return Style; - } - static void verifyFormat( llvm::StringRef Code, const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_Java)) { @@ -65,5 +59,10 @@ TEST_F(FormatTestJava, ClassDeclarations) { "}"); } +TEST_F(FormatTestJava, ThrowsDeclarations) { + verifyFormat("public void doSooooooooooooooooooooooooooomething()\n" + " throws LooooooooooooooooooooooooooooongException {}"); +} + } // end namespace tooling } // end namespace clang |