|
18 | 18 |
|
19 | 19 | NSOrderedSet *ASSnapshotTestCaseDefaultSuffixes(void); |
20 | 20 |
|
| 21 | +// Tolerances of 0.02 are based on suggested numbers in this issue: |
| 22 | +// https://github.com/uber/ios-snapshot-test-case/issues/109 |
| 23 | + |
21 | 24 | #define ASSnapshotVerifyNode(node__, identifier__) \ |
22 | 25 | { \ |
23 | 26 | [ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \ |
24 | | - FBSnapshotVerifyLayerWithOptions(node__.layer, identifier__, ASSnapshotTestCaseDefaultSuffixes(), 0) \ |
| 27 | + FBSnapshotVerifyLayerWithPixelOptions(node__.layer, identifier__, ASSnapshotTestCaseDefaultSuffixes(), 0.02, 0.02) \ |
25 | 28 | } |
26 | 29 |
|
27 | 30 | #define ASSnapshotVerifyLayer(layer__, identifier__) \ |
28 | | - FBSnapshotVerifyLayerWithOptions(layer__, identifier__, ASSnapshotTestCaseDefaultSuffixes(), 0); |
| 31 | + FBSnapshotVerifyLayerWithPixelOptions(layer__, identifier__, ASSnapshotTestCaseDefaultSuffixes(), 0.02, 0.02); |
29 | 32 |
|
30 | 33 | #define ASSnapshotVerifyView(view__, identifier__) \ |
31 | | - FBSnapshotVerifyViewWithOptions(view__, identifier__, ASSnapshotTestCaseDefaultSuffixes(), 0); |
| 34 | + FBSnapshotVerifyLayerWithPixelOptions(view__, identifier__, ASSnapshotTestCaseDefaultSuffixes(), 0.02, 0.02); |
32 | 35 |
|
33 | 36 | #define ASSnapshotVerifyViewWithTolerance(view__, identifier__, tolerance__) \ |
34 | 37 | FBSnapshotVerifyViewWithOptions(view__, identifier__, ASSnapshotTestCaseDefaultSuffixes(), tolerance__); |
|
0 commit comments