Add PromiseKit dependency

- Added PromiseKit dependency
This commit is contained in:
2018-11-15 22:08:00 -04:00
parent 2689d86c18
commit be7b6b5881
541 changed files with 46282 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
@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