Skip to content

Commit

Permalink
Update FBSnapshotTestCase and generate @3x images
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi McCallum committed Jun 8, 2016
1 parent cb67671 commit ca2fb0b
Show file tree
Hide file tree
Showing 124 changed files with 15 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@
ReferencedContainer = "container:AsyncDisplayKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "FB_REFERENCE_IMAGE_DIR"
value = "$(SOURCE_ROOT)/$(PROJECT_NAME)Tests/ReferenceImages"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASCenterLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ @interface ASCenterLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASCenterLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testWithOptions
{
[self testWithCenteringOptions:ASCenterLayoutSpecCenteringNone sizingOptions:{}];
Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASInsetLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ @interface ASInsetLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASInsetLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testInsetsWithVariableSize
{
for (NSUInteger combination = 0; combination < 16; combination++) {
Expand Down
6 changes: 6 additions & 0 deletions AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ - (void)setLayoutSpecUnderTest:(ASLayoutSpec *)layoutSpecUnderTest sizeRange:(AS

@implementation ASLayoutSpecSnapshotTestCase

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testLayoutSpec:(ASLayoutSpec *)layoutSpec
sizeRange:(ASSizeRange)sizeRange
subnodes:(NSArray *)subnodes
Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASOverlayLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ @interface ASOverlayLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASOverlayLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testOverlay
{
ASDisplayNode *backgroundNode = ASDisplayNodeWithBackgroundColor([UIColor blueColor]);
Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASRatioLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ @interface ASRatioLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASRatioLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testRatioLayoutSpecWithRatio:(CGFloat)ratio childSize:(CGSize)childSize identifier:(NSString *)identifier
{
ASStaticSizeDisplayNode *subnode = ASDisplayNodeWithBackgroundColor([UIColor greenColor]);
Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASRelativeLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ @interface ASRelativeLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASRelativeLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testWithOptions
{

Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASStackLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ @interface ASStackLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASStackLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

#pragma mark - Utility methods

static NSArray *defaultSubnodes()
Expand Down
6 changes: 0 additions & 6 deletions AsyncDisplayKitTests/ASStaticLayoutSpecSnapshotTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ @interface ASStaticLayoutSpecSnapshotTests : ASLayoutSpecSnapshotTestCase

@implementation ASStaticLayoutSpecSnapshotTests

- (void)setUp
{
[super setUp];
self.recordMode = NO;
}

- (void)testSizingBehaviour
{
[self testWithSizeRange:ASSizeRangeMake(CGSizeMake(150, 200), CGSizeMake(FLT_MAX, FLT_MAX))
Expand Down
2 changes: 1 addition & 1 deletion AsyncDisplayKitTests/ASTextKitTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static BOOL checkAttributes(const ASTextKitAttributes &attributes, const CGSize
FBSnapshotTestController *controller = [[FBSnapshotTestController alloc] init];
UIImage *labelImage = UITextViewImageWithAttributes(attributes, constrainedSize, linkTextAttributes);
UIImage *textKitImage = ASTextKitImageWithAttributes(attributes, constrainedSize);
return [controller compareReferenceImage:labelImage toImage:textKitImage error:nil];
return [controller compareReferenceImage:labelImage toImage:textKitImage tolerance:0.0 error:nil];
}

@implementation ASTextKitTests
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ platform :ios, '7.0'

target :'AsyncDisplayKitTests' do
pod 'OCMock', '~> 2.2'
pod 'FBSnapshotTestCase', '~> 1.8.1'
pod 'FBSnapshotTestCase/Core', '~> 2.1'
end

0 comments on commit ca2fb0b

Please sign in to comment.