summaryrefslogtreecommitdiffstats
path: root/unittests/Format/FormatTestComments.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTestComments.cpp')
-rw-r--r--unittests/Format/FormatTestComments.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestComments.cpp b/unittests/Format/FormatTestComments.cpp
index 7916e65e51..f3c45fac34 100644
--- a/unittests/Format/FormatTestComments.cpp
+++ b/unittests/Format/FormatTestComments.cpp
@@ -2267,6 +2267,13 @@ TEST_F(FormatTestComments, AlignTrailingComments) {
"int k; // line longg long",
getLLVMStyleWithColumns(20)));
+ // Always align if ColumnLimit = 0
+ EXPECT_EQ("int i, j; // line 1\n"
+ "int k; // line longg long",
+ format("int i, j; // line 1\n"
+ "int k; // line longg long",
+ getLLVMStyleWithColumns(0)));
+
// Align comment line sections aligned with the next token with the next
// token.
EXPECT_EQ("class A {\n"