uber / ios-snapshot-test-case

Snapshot view unit tests for iOS
MIT License
1.79k stars 211 forks source link

Perform fast memcmp comparison before making deep pixel-by-pixel comparison #142

Open constantine-fry opened 3 years ago

constantine-fry commented 3 years ago

This diff changes the logic of fb_compareWithImage to make deep comparison only if memcmp function returns false and there is tolerance for pixel mismatch.

CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Constantine Fry seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

alanzeino commented 2 years ago

Just a heads up, I'm testing this at the moment to see how much faster it is; we have 20k snapshot tests so we should have some decent numbers soon. Thanks!