Files
Jot/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.m
James Griffin be7b6b5881 Add PromiseKit dependency
- Added PromiseKit dependency
2018-11-15 22:12:39 -04:00

35 lines
799 B
Objective-C

@import PromiseKit;
@import XCTest;
#import "Infrastructure.h"
@interface BridgingTests: XCTestCase @end @implementation BridgingTests
- (void)testChainAnyPromiseFromSwiftCode {
XCTestExpectation *ex = [self expectationWithDescription:@""];
AnyPromise *promise = PMKAfter(0.02);
for (int x = 0; x < 100; ++x) {
promise = promise.then(^{
return [[[PromiseBridgeHelper alloc] init] bridge1];
});
}
promise.then(^{
[ex fulfill];
});
[self waitForExpectationsWithTimeout:20 handler:nil];
}
- (void)test626 {
XCTestExpectation *ex = [self expectationWithDescription:@""];
testCase626().then(^{
XCTFail();
}).ensure(^{
[ex fulfill];
});
[self waitForExpectationsWithTimeout:20 handler:nil];
}
@end