Fix the dealloc test (#2216)

This commit is contained in:
Adlai Holler
2016-09-08 14:25:00 -07:00
committed by GitHub
parent bc59b96ca9
commit 85fee6b609

View File

@@ -80,7 +80,7 @@ for (ASDisplayNode *n in @[ nodes ]) {\
@end
@interface ASTestDisplayNode : ASDisplayNode
@property (nonatomic, copy) void (^willDeallocBlock)(ASTestDisplayNode *node);
@property (nonatomic, copy) void (^willDeallocBlock)(__unsafe_unretained ASTestDisplayNode *node);
@property (nonatomic, copy) CGSize(^calculateSizeBlock)(ASTestDisplayNode *node, CGSize size);
@property (nonatomic) BOOL hasFetchedData;
@@ -1044,7 +1044,7 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point
[self executeOffThread:^{
@autoreleasepool {
ASTestDisplayNode *node = [[ASTestDisplayNode alloc] init];
node.willDeallocBlock = ^(ASDisplayNode *n){
node.willDeallocBlock = ^(__unsafe_unretained ASDisplayNode *n){
XCTAssertTrue([NSThread isMainThread], @"unexpected node dealloc %@ %@", n, [NSThread currentThread]);
didDealloc = YES;
};