Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Report a detailed error when the snapshot image size doesn't match #22

Closed
dblock opened this issue Mar 13, 2014 · 2 comments
Closed

Report a detailed error when the snapshot image size doesn't match #22

dblock opened this issue Mar 13, 2014 · 2 comments

Comments

@dblock
Copy link
Contributor

dblock commented Mar 13, 2014

In some cases you have a snapshot using a simulator of a different size. Instead of just reporting that the snapshot doesn't match, report that the sizes don't match (with the sizes included in the error).

It took me a while to figure out that the simulator running on Travis-CI was a 4'' one for example (no idea why that's the default, btw).

@x2on
Copy link
Contributor

x2on commented Mar 17, 2014

Could give me an example?
If the images doesn't have the same sizes the following error which both sizes appears :

FBSnapshotTestCaseDemoTests.m:32: error: -[FBSnapshotTestCaseDemoTests testExample] :
((comparisonSuccess__) is true) failed - Snapshot comparison failed: 
Error Domain=FBSnapshotTestControllerErrorDomain Code=3 "Images different sizes" 
UserInfo=0x8e27760 {
NSLocalizedFailureReason=referenceImage:{64, 64}, image:{34, 64}, 
NSLocalizedDescription=Images different sizes
}

@dblock
Copy link
Contributor Author

dblock commented Mar 17, 2014

Oh that's good. I think I am swallowing this error in https:/dblock/ios-snapshot-test-case-expecta.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants