summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-06-10 13:27:57 +0000
committerDaniel Jasper <djasper@google.com>2014-06-10 13:27:57 +0000
commit3724cafa4b4455f77eece0bd7589dc21ac7d52a3 (patch)
tree474302e071c383fdf69d43a11c2bdb16bdf615ef /unittests
parentff8776e01383fde7a7ba7b59d879914b44df5cea (diff)
downloadclang-3724cafa4b4455f77eece0bd7589dc21ac7d52a3.tar.gz
clang-3724cafa4b4455f77eece0bd7589dc21ac7d52a3.tar.bz2
clang-3724cafa4b4455f77eece0bd7589dc21ac7d52a3.tar.xz
clang-format: Increase penalty for wrapping array subscript expressions
Before: aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0].aaaaaaa [0].aaaaaaaaaaaaaaaaaaaaaa(); After: aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0] .aaaaaaa[0] .aaaaaaaaaaaaaaaaaaaaaa(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index baf05a9b74..a923e1a9f8 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -5110,6 +5110,10 @@ TEST_F(FormatTest, FormatsArrays) {
verifyGoogleFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<int>\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaa];");
+ verifyFormat(
+ "aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0]\n"
+ " .aaaaaaa[0]\n"
+ " .aaaaaaaaaaaaaaaaaaaaaa();");
}
TEST_F(FormatTest, LineStartsWithSpecialCharacter) {