gergap marked an inline comment as done.
gergap added inline comments.

================
Comment at: clang/unittests/Format/FormatTest.cpp:15045
+  // PAS_RIGHT
   EXPECT_EQ("void SomeFunction(int parameter = 0) {\n"
             "  int const i   = 1;\n"
----------------
gergap wrote:
> HazardyKnusperkeks wrote:
> > I don't know why this is `EXPECT_EQ` instead of `verifyFormat`, but I know 
> > someone who will request that. :)
> > 
> > You should change that here and use that for your following tests.
> I don't know, because I'm not the author of that code.
> But I can change it to verifyFormat if this is what you prefer.
> 
The verifyFormat() call with one code parameter does not work with this test 
pattern, because the internal messUpCode function removes the newlines.
The consecutive alignments are interrupted by newlines, which lead to different 
indent for each section. This breaks with messUpCode.

However, there is a verifyFormat function with two code arguments, wich behaves 
similar to the existing EXPECT_EQ. This way it works.
I go for this option now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103245/new/

https://reviews.llvm.org/D103245

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to