Add PromiseKit dependency
- Added PromiseKit dependency
This commit is contained in:
34
Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.m
vendored
Normal file
34
Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.m
vendored
Normal 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
|
Reference in New Issue
Block a user