This patch adds a verifyNoChange macro to verify code that won't change after being formatted. (The code will not be messed up before being formatted.) It then replaces EXPECT_EQ with verifyFormat wherever applicable so that the code will be messed up before being formatted. When the replacement fails the unit test, verifyFormat is replaced with verifyNoChange.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Because FormatTestCSharp.cpp, FormatTestJS.cpp, and FormatTestSelective.cpp don't #include FormatTestBase.h, they can't benefit from verifyNoChange. However, the rest of the unit tests are all free of the repeated arguments in EXPECT_EQ and verifyFormat (as far as my script could identify and replace).