aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-03-20 15:58:10 +0000
committerDaniel Jasper <djasper@google.com>2013-03-20 15:58:10 +0000
commit92f9faf3cf1065f987f227e0c2fdf06fcccf1ae8 (patch)
treed7059d55aa1c85d0fff9b7e24d8f3c55931af233 /unittests
parent6fe554eb4e7075cbfda927c4747d7346a27637f1 (diff)
downloadclang-92f9faf3cf1065f987f227e0c2fdf06fcccf1ae8.tar.gz
Remove assertion that can be triggered on bad input.
clang-format can't do anything useful, so it should leave the remainder of the line unchanged, but it should not assert/segfault. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 2a3d66dfd7..0edb19166d 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2413,7 +2413,10 @@ TEST_F(FormatTest, IncorrectAccessSpecifier) {
"B { int x; }");
}
-TEST_F(FormatTest, IncorrectCodeUnbalancedBraces) { verifyFormat("{"); }
+TEST_F(FormatTest, IncorrectCodeUnbalancedBraces) {
+ verifyFormat("{");
+ verifyFormat("#})");
+}
TEST_F(FormatTest, IncorrectCodeDoNoWhile) {
verifyFormat("do {\n}");