diff options
author | Owen Pan <owenpiano@gmail.com> | 2023-06-17 15:19:01 -0700 |
---|---|---|
committer | Owen Pan <owenpiano@gmail.com> | 2023-06-17 15:25:59 -0700 |
commit | 8411bdb0acde8569c9bfcd08401fa587f7dea834 (patch) | |
tree | 345555544f266d70d8571af1585009316d44237f /clang/unittests/Format/FormatTestComments.cpp | |
parent | 06ef0a3342d3e75f98c2a1844786b18ed2202c95 (diff) | |
download | llvm-8411bdb0acde8569c9bfcd08401fa587f7dea834.zip llvm-8411bdb0acde8569c9bfcd08401fa587f7dea834.tar.gz llvm-8411bdb0acde8569c9bfcd08401fa587f7dea834.tar.bz2 |
[clang-format][NFC] Remove redundant getLLVMStyle() in unit tests
Diffstat (limited to 'clang/unittests/Format/FormatTestComments.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestComments.cpp | 88 |
1 files changed, 30 insertions, 58 deletions
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp index 15c6767..b0ba00c 100644 --- a/clang/unittests/Format/FormatTestComments.cpp +++ b/clang/unittests/Format/FormatTestComments.cpp @@ -565,12 +565,12 @@ TEST_F(FormatTestComments, SplitsLongCxxComments) { EXPECT_EQ("//! Add leading\n" "//! whitespace", format("//!Add leading whitespace", getLLVMStyleWithColumns(20))); - EXPECT_EQ("// whitespace", format("//whitespace", getLLVMStyle())); + EXPECT_EQ("// whitespace", format("//whitespace")); EXPECT_EQ("// Even if it makes the line exceed the column\n" "// limit", format("//Even if it makes the line exceed the column limit", getLLVMStyleWithColumns(51))); - verifyFormat("//--But not here", getLLVMStyle()); + verifyFormat("//--But not here"); EXPECT_EQ("/// line 1\n" "// add leading whitespace", format("/// line 1\n" @@ -3076,65 +3076,53 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { EXPECT_EQ("/*\n" " */", format("/*\n" - "*/", - getLLVMStyle())); + "*/")); EXPECT_EQ("/*\n" " */", format("/*\n" - " */", - getLLVMStyle())); + " */")); EXPECT_EQ("/*\n" " */", format("/*\n" - " */", - getLLVMStyle())); + " */")); // Align a single line. EXPECT_EQ("/*\n" " * line */", format("/*\n" - "* line */", - getLLVMStyle())); + "* line */")); EXPECT_EQ("/*\n" " * line */", format("/*\n" - " * line */", - getLLVMStyle())); + " * line */")); EXPECT_EQ("/*\n" " * line */", format("/*\n" - " * line */", - getLLVMStyle())); + " * line */")); EXPECT_EQ("/*\n" " * line */", format("/*\n" - " * line */", - getLLVMStyle())); + " * line */")); EXPECT_EQ("/**\n" " * line */", format("/**\n" - "* line */", - getLLVMStyle())); + "* line */")); EXPECT_EQ("/**\n" " * line */", format("/**\n" - " * line */", - getLLVMStyle())); + " * line */")); EXPECT_EQ("/**\n" " * line */", format("/**\n" - " * line */", - getLLVMStyle())); + " * line */")); EXPECT_EQ("/**\n" " * line */", format("/**\n" - " * line */", - getLLVMStyle())); + " * line */")); EXPECT_EQ("/**\n" " * line */", format("/**\n" - " * line */", - getLLVMStyle())); + " * line */")); // Align the end '*/' after a line. EXPECT_EQ("/*\n" @@ -3142,64 +3130,53 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { " */", format("/*\n" "* line\n" - "*/", - getLLVMStyle())); + "*/")); EXPECT_EQ("/*\n" " * line\n" " */", format("/*\n" " * line\n" - " */", - getLLVMStyle())); + " */")); EXPECT_EQ("/*\n" " * line\n" " */", format("/*\n" " * line\n" - " */", - getLLVMStyle())); + " */")); // Align two lines. EXPECT_EQ("/* line 1\n" " * line 2 */", format("/* line 1\n" - " * line 2 */", - getLLVMStyle())); + " * line 2 */")); EXPECT_EQ("/* line 1\n" " * line 2 */", format("/* line 1\n" - "* line 2 */", - getLLVMStyle())); + "* line 2 */")); EXPECT_EQ("/* line 1\n" " * line 2 */", format("/* line 1\n" - " * line 2 */", - getLLVMStyle())); + " * line 2 */")); EXPECT_EQ("/* line 1\n" " * line 2 */", format("/* line 1\n" - " * line 2 */", - getLLVMStyle())); + " * line 2 */")); EXPECT_EQ("/* line 1\n" " * line 2 */", format("/* line 1\n" - " * line 2 */", - getLLVMStyle())); + " * line 2 */")); EXPECT_EQ("int i; /* line 1\n" " * line 2 */", format("int i; /* line 1\n" - "* line 2 */", - getLLVMStyle())); + "* line 2 */")); EXPECT_EQ("int i; /* line 1\n" " * line 2 */", format("int i; /* line 1\n" - " * line 2 */", - getLLVMStyle())); + " * line 2 */")); EXPECT_EQ("int i; /* line 1\n" " * line 2 */", format("int i; /* line 1\n" - " * line 2 */", - getLLVMStyle())); + " * line 2 */")); // Align several lines. EXPECT_EQ("/* line 1\n" @@ -3207,15 +3184,13 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { " * line 3 */", format("/* line 1\n" " * line 2\n" - "* line 3 */", - getLLVMStyle())); + "* line 3 */")); EXPECT_EQ("/* line 1\n" " * line 2\n" " * line 3 */", format("/* line 1\n" " * line 2\n" - "* line 3 */", - getLLVMStyle())); + "* line 3 */")); EXPECT_EQ("/*\n" "** line 1\n" "** line 2\n" @@ -3223,8 +3198,7 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { format("/*\n" "** line 1\n" " ** line 2\n" - "*/", - getLLVMStyle())); + "*/")); // Align with different indent after the decorations. EXPECT_EQ("/*\n" @@ -3238,8 +3212,7 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { " * line 2\n" " * line 3\n" "* line 4\n" - "*/", - getLLVMStyle())); + "*/")); // Align empty or blank lines. EXPECT_EQ("/**\n" @@ -3251,8 +3224,7 @@ TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { "* \n" " * \n" " *\n" - "*/", - getLLVMStyle())); + "*/")); // Align while breaking and reflowing. EXPECT_EQ("/*\n" |