================ @@ -493,9 +493,36 @@ TEST_F(FormatTestComments, AlignsBlockComments) { TEST_F(FormatTestComments, CommentReflowingCanBeTurnedOff) { FormatStyle Style = getLLVMStyleWithColumns(20); - Style.ReflowComments = false; - verifyFormat("// aaaaaaaaa aaaaaaaaaa aaaaaaaaaa", Style); - verifyFormat("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa */", Style); + Style.ReflowComments = FormatStyle::RCS_Never; + verifyNoChange("// aaaaaaaaa aaaaaaaaaa aaaaaaaaaa", Style); + verifyNoChange("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa */", Style); + verifyNoChange("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa\n" + "aaaaaaaaa*/", + Style); + verifyNoChange("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa\n" + " aaaaaaaaa*/", + Style); + verifyNoChange("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa\n" + " * aaaaaaaaa*/", + Style); +} + +TEST_F(FormatTestComments, CommentReflowingCanApplyOnlyToIndents) { + FormatStyle Style = getLLVMStyleWithColumns(20); + Style.ReflowComments = FormatStyle::RCS_IndentOnly; + verifyNoChange("// aaaaaaaaa aaaaaaaaaa aaaaaaaaaa", Style); + verifyNoChange("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa */", Style); ---------------- owenca wrote:
```suggestion verifyFormat("// aaaaaaaaa aaaaaaaaaa aaaaaaaaaa", Style); verifyFormat("/* aaaaaaaaa aaaaaaaaaa aaaaaaaaaa */", Style); ``` https://github.com/llvm/llvm-project/pull/96804 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits