diff options
author | Daniel Jasper <djasper@google.com> | 2013-08-30 08:29:25 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-08-30 08:29:25 +0000 |
commit | f79b0b15623a9138d629dac7f7928fa9630d83bc (patch) | |
tree | 403a798ce617909e28c146e534ef4d67e97ea008 /clang/unittests/Format/FormatTest.cpp | |
parent | 2cf664fb86e0abbf8d9000e9a71f31e0fa1203d4 (diff) | |
download | bcm5719-llvm-f79b0b15623a9138d629dac7f7928fa9630d83bc.tar.gz bcm5719-llvm-f79b0b15623a9138d629dac7f7928fa9630d83bc.zip |
clang-format: Fix incorrect indentation.
Before:
aaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(
dddddddddddddddddddddddddddddd));
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(
dddddddddddddddddddddddddddddd));
After:
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(
dddddddddddddddddddddddddddddd));
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(
dddddddddddddddddddddddddddddd));
This was overlooked when interducing the new builder-type call
detection in r189337. Also, some minor reorganization of a test.
llvm-svn: 189658
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index dc2dc01e203..9c8efd882c4 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2212,14 +2212,11 @@ TEST_F(FormatTest, PutEmptyBlocksIntoOneLine) { // Line break tests. //===----------------------------------------------------------------------===// -TEST_F(FormatTest, FormatsAwesomeMethodCall) { +TEST_F(FormatTest, PreventConfusingIndents) { verifyFormat( "SomeLongMethodName(SomeReallyLongMethod(CallOtherReallyLongMethod(\n" " parameter, parameter, parameter)),\n" " SecondLongCall(parameter));"); -} - -TEST_F(FormatTest, PreventConfusingIndents) { verifyFormat( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n" " aaaaaaaaaaaaaaaaaaaaaaaa(\n" @@ -2724,6 +2721,12 @@ TEST_F(FormatTest, BreaksDesireably) { " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);"); + // Indent consistently indenpendent of call expression. + verifyFormat("aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(\n" + " dddddddddddddddddddddddddddddd));\n" + "aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(\n" + " dddddddddddddddddddddddddddddd));"); + // This test case breaks on an incorrect memoization, i.e. an optimization not // taking into account the StopAt value. verifyFormat( @@ -5259,7 +5262,7 @@ TEST_F(FormatTest, BreakStringLiterals) { getLLVMStyleWithColumns(20))); EXPECT_EQ( "f(\"one two\".split(\n" - " variable));", + " variable));", format("f(\"one two\".split(variable));", getLLVMStyleWithColumns(20))); EXPECT_EQ("f(\"one two three four five six \"\n" " \"seven\".split(\n" |