diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-12 16:51:23 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-12 16:51:23 +0000 |
commit | 2204562acdc8eb94c2a2b7088e2fc0dc7a0f70e3 (patch) | |
tree | 51d2be968005bdcfe1cd22010e85f969becbc162 /clang/unittests/Format/FormatTest.cpp | |
parent | 5e76aa971418b5aa6736ebcdf1644c74687f126b (diff) | |
download | bcm5719-llvm-2204562acdc8eb94c2a2b7088e2fc0dc7a0f70e3.tar.gz bcm5719-llvm-2204562acdc8eb94c2a2b7088e2fc0dc7a0f70e3.zip |
Fix bug in the adjustment to existing lines.
Before (if only the second line was reformatted):
void f() {}
void g() {}
After:
void f() {}
void g() {}
llvm-svn: 174978
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index e9520b618c3..f1cef2a03d1 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2660,6 +2660,9 @@ TEST_F(FormatTest, ReformatRegionAdjustsIndent) { " }", format(" {\n" "a;\n" " }", 4, 2, getLLVMStyle())); + EXPECT_EQ("void f() {}\n" + "void g() {}", format("void f() {}\n" + "void g() {}", 13, 0, getLLVMStyle())); } } // end namespace tooling |