[PATCH] D153109: [clang-format][NFC] Clean up unit tests
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 16 00:39:05 PDT 2023
owenpan created this revision.
Herald added projects: All, clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, MyDeveloperDay.
owenpan requested review of this revision.
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`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153109
Files:
clang/unittests/Format/FormatTest.cpp
clang/unittests/Format/FormatTestBase.h
clang/unittests/Format/FormatTestComments.cpp
clang/unittests/Format/FormatTestJava.cpp
clang/unittests/Format/QualifierFixerTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153109.532013.patch
Type: text/x-patch
Size: 40767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230616/34239c44/attachment-0001.bin>
More information about the cfe-commits
mailing list