summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 9a1cb907468..43003befb67 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -379,8 +379,9 @@ TEST_F(FormatTest, FormatsFunctionDefinition) {
TEST_F(FormatTest, FormatsAwesomeMethodCall) {
verifyFormat(
- "SomeLongMethodName(SomeReallyLongMethod(CallOtherReallyLongMethod(\n"
- " parameter, parameter, parameter)), SecondLongCall(parameter));");
+ "SomeLongMethodName(SomeReallyLongMethod(\n"
+ " CallOtherReallyLongMethod(parameter, parameter, parameter)),\n"
+ " SecondLongCall(parameter));");
}
TEST_F(FormatTest, ConstructorInitializers) {
@@ -454,6 +455,13 @@ TEST_F(FormatTest, BreaksDesireably) {
" aaaaaaaaaaa(aaaaaaaaa) || aaaaaaaaaaaaaaaaaaaaaaa ||\n"
" aaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaa ||\n"
" (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);");
+
+ verifyFormat(
+ "{\n {\n {\n"
+ " Annotation.SpaceRequiredBefore =\n"
+ " Line.Tokens[i - 1].Tok.isNot(tok::l_paren) &&\n"
+ " Line.Tokens[i - 1].Tok.isNot(tok::l_square);\n"
+ " }\n }\n}");
}
TEST_F(FormatTest, BreaksAccordingToOperatorPrecedence) {
OpenPOWER on IntegriCloud