mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
Enable experiment in tests
This commit is contained in:
@@ -34,6 +34,11 @@
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
|
||||
ASConfiguration *config = [ASConfiguration new];
|
||||
config.experimentalFeatures = ASExperimentalOptimizeDataControllerPipeline;
|
||||
[ASConfigurationManager test_resetWithConfiguration:config];
|
||||
|
||||
// Default is 2 sections: 2 items in first, 1 item in second.
|
||||
sections = [NSMutableArray array];
|
||||
[sections addObject:[ASTestSection new]];
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
#import <OCMock/OCMock.h>
|
||||
#import <AsyncDisplayKit/ASCollectionView+Undeprecated.h>
|
||||
#import <AsyncDisplayKit/ASDisplayNode+FrameworkPrivate.h>
|
||||
|
||||
#import "ASDisplayNodeTestsHelper.h"
|
||||
#import "ASTestCase.h"
|
||||
|
||||
@interface ASTextCellNodeWithSetSelectedCounter : ASTextCellNode
|
||||
|
||||
@@ -166,12 +168,20 @@
|
||||
|
||||
@end
|
||||
|
||||
@interface ASCollectionViewTests : XCTestCase
|
||||
@interface ASCollectionViewTests : ASTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation ASCollectionViewTests
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
ASConfiguration *config = [ASConfiguration new];
|
||||
config.experimentalFeatures = ASExperimentalOptimizeDataControllerPipeline;
|
||||
[ASConfigurationManager test_resetWithConfiguration:config];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
// We can't prevent the system from retaining windows, but we can at least clear them out to avoid
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
#import <AsyncDisplayKit/ASCollectionView.h>
|
||||
#import <stdatomic.h>
|
||||
|
||||
#import "ASTestCase.h"
|
||||
#import "ASThrashUtility.h"
|
||||
|
||||
@interface ASCollectionViewThrashTests : XCTestCase
|
||||
@interface ASCollectionViewThrashTests : ASTestCase
|
||||
|
||||
@end
|
||||
|
||||
@@ -25,8 +26,18 @@
|
||||
BOOL _failed;
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
ASConfiguration *config = [ASConfiguration new];
|
||||
config.experimentalFeatures = ASExperimentalOptimizeDataControllerPipeline;
|
||||
[ASConfigurationManager test_resetWithConfiguration:config];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[super tearDown];
|
||||
|
||||
if (_failed && _update != nil) {
|
||||
NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ static ASExperimentalFeatures features[] = {
|
||||
];
|
||||
}
|
||||
|
||||
- (ASExperimentalFeatures)allFeatures {
|
||||
- (ASExperimentalFeatures)allFeatures
|
||||
{
|
||||
ASExperimentalFeatures allFeatures = 0;
|
||||
for (int i = 0; i < sizeof(features)/sizeof(ASExperimentalFeatures); i++) {
|
||||
allFeatures |= features[i];
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#import <AsyncDisplayKit/ASTableView+Undeprecated.h>
|
||||
#import <AsyncDisplayKit/ASInternalHelpers.h>
|
||||
|
||||
#import "ASTestCase.h"
|
||||
#import "ASXCTExtensions.h"
|
||||
|
||||
#define NumberOfSections 10
|
||||
@@ -217,12 +218,20 @@
|
||||
|
||||
@end
|
||||
|
||||
@interface ASTableViewTests : XCTestCase
|
||||
@interface ASTableViewTests : ASTestCase
|
||||
@property (nonatomic, retain) ASTableView *testTableView;
|
||||
@end
|
||||
|
||||
@implementation ASTableViewTests
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
ASConfiguration *config = [ASConfiguration new];
|
||||
config.experimentalFeatures = ASExperimentalOptimizeDataControllerPipeline;
|
||||
[ASConfigurationManager test_resetWithConfiguration:config];
|
||||
}
|
||||
|
||||
- (void)testDataSourceImplementsNecessaryMethods
|
||||
{
|
||||
ASTestTableView *tableView = [[ASTestTableView alloc] __initWithFrame:CGRectMake(0, 0, 100, 400)
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
#import <AsyncDisplayKit/ASTableView+Undeprecated.h>
|
||||
#import <stdatomic.h>
|
||||
|
||||
#import "ASTestCase.h"
|
||||
#import "ASThrashUtility.h"
|
||||
|
||||
@interface ASTableViewThrashTests: XCTestCase
|
||||
@interface ASTableViewThrashTests: ASTestCase
|
||||
@end
|
||||
|
||||
@implementation ASTableViewThrashTests
|
||||
@@ -27,8 +28,17 @@
|
||||
|
||||
#pragma mark Overrides
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
ASConfiguration *config = [ASConfiguration new];
|
||||
config.experimentalFeatures = ASExperimentalOptimizeDataControllerPipeline;
|
||||
[ASConfigurationManager test_resetWithConfiguration:config];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[super tearDown];
|
||||
if (_failed && _update != nil) {
|
||||
NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user