swift-testing
swift-testing copied to clipboard
Diffing for equality (e.g. ==) expressions in expectations
Description
This tracks enhancing expectations (e.g. #expect and similar) so that when the top-level expression is a binary equality operator (e.g. a == b) and the expectation fails, the failure message should attempt to collect and show a meaningful "diff", i.e. a summary of the differences of the two operands and their substructure.
Additional information
There's a lot of prior art in this space in other testing frameworks/libraries. For example, Difference.
I could swear we have an issue tracking this feature already.
Maybe #11?