aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-12 07:36:22 +0000
committerDaniel Jasper <djasper@google.com>2013-01-12 07:36:22 +0000
commitb312314cd7aaf8a4c3902aa28c8bc0a9662a8e9b (patch)
treec331c7ef76ca2e7a4ff00ef993924b3bcfdc8b24 /unittests/Format/FormatTest.cpp
parentf681fa8238b82822a3d939f0e4df80660666f8b1 (diff)
Fix incorrect comparison operator causing loooong formatting times.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 84ce0c1e06..668e8af76b 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -681,6 +681,24 @@ TEST_F(FormatTest, ConstructorInitializers) {
" : some_var_(var), // 4 space indent\n"
" some_other_var_(var + 1) { // lined up\n"
"}");
+
+ // This test takes VERY long when memoization is broken.
+ verifyGoogleFormat(
+ "Constructor()\n"
+ " : aaaa(a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,"
+ " a, a, a,\n"
+ " a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,"
+ " a, a, a,\n"
+ " a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,"
+ " a, a, a,\n"
+ " a, a, a, a, a, a, a, a, a, a, a)\n"
+ " aaaa(a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,"
+ " a, a, a,\n"
+ " a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,"
+ " a, a, a,\n"
+ " a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,"
+ " a, a, a,\n"
+ " a, a, a, a, a, a, a, a, a, a, a) {}\n");
}
TEST_F(FormatTest, BreaksAsHighAsPossible) {