Skip to content

Commit

Permalink
Autorecord to reference images directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
babbage committed Feb 16, 2019
1 parent 6eb98b0 commit 74488be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
5 changes: 4 additions & 1 deletion FBSnapshotTestCase/FBSnapshotTestController.m
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,10 @@ - (BOOL)_performPixelComparisonWithViewOrLayer:(id)viewOrLayer
BOOL imagesSame;

if (referenceImage == nil && self.autoRecord) {
imagesSame = NO;
NSError *saveError = nil;
if ([self _saveReferenceImage:snapshot selector:selector identifier:identifier error:errorPtr] == NO) {
NSLog(@"Error saving autorecorded reference image: %@", saveError);
}
} else {
imagesSame = [self compareReferenceImage:referenceImage toImage:snapshot tolerance:tolerance error:errorPtr];
}
Expand Down

0 comments on commit 74488be

Please sign in to comment.