================
@@ -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);
----------------
ichaer wrote:

Oh wow, so `verifyFormat()`, when called with a single code argument, will 
first check that it doesn't change, then it will apply a specific type of 
transformation and check that we format it back to what it was? That's a bit 
surprising.

It seems to me that in our case `messUp()` would remove duplicate spaces, and, 
if the string started with a single space, it would remove that as well... is 
that right? It looks to me like it's not changing anything, but if it did 
change things inside the comments (which, if my reading is correct, it could 
do) we would like for the test to fail. Are there more test cases you'd like me 
to add instead?

Same about [the comment 
below](https://github.com/llvm/llvm-project/pull/96804/files/1d653048fc9084be2f52fbd7aeb4bf3e0f9e7326#r1716525064).

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

Reply via email to