clang-format: Refactoring.

Re-apply r222638 and r222641 without variadic templates.

llvm-svn: 222747
This commit is contained in:
Daniel Jasper
2014-11-25 10:05:17 +00:00
parent f1449e99b9
commit a98b7b01be
6 changed files with 386 additions and 404 deletions

View File

@@ -54,6 +54,17 @@ TEST_F(FormatTestJava, NoAlternativeOperatorNames) {
verifyFormat("someObject.and();");
}
TEST_F(FormatTestJava, FormatsInstanceOfLikeOperators) {
FormatStyle Style = getStyleWithColumns(50);
verifyFormat("return aaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
" instanceof bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;",
Style);
Style.BreakBeforeBinaryOperators = FormatStyle::BOS_None;
verifyFormat("return aaaaaaaaaaaaaaaaaaaaaaaaaaaaa instanceof\n"
" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;",
Style);
}
TEST_F(FormatTestJava, ClassDeclarations) {
verifyFormat("public class SomeClass {\n"
" private int a;\n"