From 9ece2bb8499251f3e7cdf65e7a65b38aaeead0d8 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 12 Feb 2013 16:51:23 +0000 Subject: 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() {} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174978 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Format/FormatTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'unittests/Format/FormatTest.cpp') diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index e9520b618c..f1cef2a03d 100644 --- a/unittests/Format/FormatTest.cpp +++ b/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 -- cgit v1.2.3-18-g5258