diff options
| author | Manuel Klimek <klimek@google.com> | 2013-03-01 13:29:19 +0000 |
|---|---|---|
| committer | Manuel Klimek <klimek@google.com> | 2013-03-01 13:29:19 +0000 |
| commit | e317d1b1e8fae926239aa1e0d75fc1ddd679199d (patch) | |
| tree | f7edd053ac41c652bf624ae2e9d1b8a5ae6a749f /clang/unittests/Format | |
| parent | b176cff89de33a17f3e664b612c8b78882b801e0 (diff) | |
| download | bcm5719-llvm-e317d1b1e8fae926239aa1e0d75fc1ddd679199d.tar.gz bcm5719-llvm-e317d1b1e8fae926239aa1e0d75fc1ddd679199d.zip | |
Implements breaking string literals at slashes.
We now break at a slash if we do not find a space to break on.
Also fixes a bug where we would go over the limit when breaking the
second line.
llvm-svn: 176350
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 8cc81684cb4..8b1f69a76e7 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3045,9 +3045,15 @@ TEST_F(FormatTest, BreakStringLiterals) { EXPECT_EQ( "\"splitmea\"\n" - "\"trandompo\"\n" - "\"int\"", + "\"trandomp\"\n" + "\"oint\"", format("\"splitmeatrandompoint\"", getLLVMStyleWithColumns(10))); + + EXPECT_EQ( + "\"split/\"\n" + "\"pathat/\"\n" + "\"slashes\"", + format("\"split/pathat/slashes\"", getLLVMStyleWithColumns(10))); } } // end namespace tooling |

