swift-snapshot-testing
swift-snapshot-testing copied to clipboard
Returns a Diff for the same UIImage.
I have the problem that I get the error message for two identical images: "Snapshot does not match reference." That's why I took a closer look at the algorithm,
The method compare in the UIImage Extension returns true if the differentPixelsCount is 0 and the precision is 1. That leads to the failure message:
"Newly-taken snapshot does not match reference."
If I understand the algorithm correctly the following if statement should use >= instead of >.
https://github.com/pointfreeco/swift-snapshot-testing/blob/567c66adf318612f9482fdaf62c09df1aa57ee87/Sources/SnapshotTesting/Snapshotting/UIImage.swift#L107
Is anyone able to help me?