aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-02-08 19:53:32 +0000
committerManuel Klimek <klimek@google.com>2013-02-08 19:53:32 +0000
commit52635ff9fb530dfdfc6a94e52a2270bf1bb8346b (patch)
treec09d57e13169f24069b205c57a512a40336c2a46 /unittests/Format/FormatTest.cpp
parent8185674528423e2504a1fae35c28c24104846510 (diff)
Fix indentation-detection at indent level 0.
This correctly formats: { a; } where { is incorrectly indented by 2, but is at level 0, when reformatting only 'a;'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index df0b2962f2..a8c327a0d5 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2593,7 +2593,12 @@ TEST_F(FormatTest, ReformatRegionAdjustsIndent) {
" b;\n"
"}\n"
"}", 22, 2, getLLVMStyle()));
-}
+ EXPECT_EQ(" {\n"
+ " a;\n"
+ " }", format(" {\n"
+ "a;\n"
+ " }", 4, 2, getLLVMStyle()));
+}
} // end namespace tooling
} // end namespace clang