diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 9a1cb90746..43003befb6 100644 --- a/unittests/Format/FormatTest.cpp +++ b/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) { |