Merge pull request #1729 from levi/reverseFlatten

[Tests] Update FBSnapshotTestCase and generate @3x images
This commit is contained in:
appleguy 2016-06-08 19:21:18 -07:00
commit bbffc86040
124 changed files with 15 additions and 44 deletions

View File

@ -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>

View File

@ -21,12 +21,6 @@ static const ASSizeRange kSize = {{100, 120}, {320, 160}};
@implementation ASCenterLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testWithOptions
{
[self testWithCenteringOptions:ASCenterLayoutSpecCenteringNone sizingOptions:{}];

View File

@ -45,12 +45,6 @@ static NSString *nameForInsets(UIEdgeInsets insets)
@implementation ASInsetLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testInsetsWithVariableSize
{
for (NSUInteger combination = 0; combination < 16; combination++) {

View File

@ -20,6 +20,12 @@
@implementation ASLayoutSpecSnapshotTestCase
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testLayoutSpec:(ASLayoutSpec *)layoutSpec
sizeRange:(ASSizeRange)sizeRange
subnodes:(NSArray *)subnodes

View File

@ -20,12 +20,6 @@ static const ASSizeRange kSize = {{320, 320}, {320, 320}};
@implementation ASOverlayLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testOverlay
{
ASDisplayNode *backgroundNode = ASDisplayNodeWithBackgroundColor([UIColor blueColor]);

View File

@ -19,12 +19,6 @@ static const ASSizeRange kFixedSize = {{0, 0}, {100, 100}};
@implementation ASRatioLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testRatioLayoutSpecWithRatio:(CGFloat)ratio childSize:(CGSize)childSize identifier:(NSString *)identifier
{
ASStaticSizeDisplayNode *subnode = ASDisplayNodeWithBackgroundColor([UIColor greenColor]);

View File

@ -21,12 +21,6 @@ static const ASSizeRange kSize = {{100, 120}, {320, 160}};
@implementation ASRelativeLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testWithOptions
{

View File

@ -21,12 +21,6 @@
@implementation ASStackLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
#pragma mark - Utility methods
static NSArray *defaultSubnodes()

View File

@ -16,12 +16,6 @@
@implementation ASStaticLayoutSpecSnapshotTests
- (void)setUp
{
[super setUp];
self.recordMode = NO;
}
- (void)testSizingBehaviour
{
[self testWithSizeRange:ASSizeRangeMake(CGSizeMake(150, 200), CGSizeMake(FLT_MAX, FLT_MAX))

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Some files were not shown because too many files have changed in this diff Show More