From 6b119d63f5036344acd4e00a6ff2b3c72f26966f Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 5 Apr 2013 17:22:09 +0000 Subject: Allow breaking after 'class' for classes with looong names. (Don't ask, this was a user request). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178888 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Format/FormatTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'unittests/Format/FormatTest.cpp') diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 54e7381207..0ef241e34e 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -987,7 +987,7 @@ TEST_F(FormatTest, SeparatesLogicalBlocks) { "};")); } -TEST_F(FormatTest, FormatsDerivedClass) { +TEST_F(FormatTest, FormatsClasses) { verifyFormat("class A : public B {\n};"); verifyFormat("class A : public ::B {\n};"); @@ -1009,6 +1009,10 @@ TEST_F(FormatTest, FormatsDerivedClass) { " public F,\n" " public G {\n" "};"); + + verifyFormat("class\n" + " ReallyReallyLongClassName {\n};", + getLLVMStyleWithColumns(32)); } TEST_F(FormatTest, FormatsVariableDeclarationsAfterStructOrClass) { -- cgit v1.2.3-70-g09d2