Skip to content

Commit

Permalink
Fix XCTestBootstrap for new Xcode 12 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fr0l committed Sep 22, 2020
1 parent ee4e262 commit 87b5c21
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PrivateHeaders/XCTest/XCTestManager_IDEInterface-Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

@class NSArray, NSDictionary, NSNumber, NSString, XCAccessibilityElement, XCActivityRecord, XCElementSnapshot;
@class NSArray, NSDictionary, NSNumber, NSString, XCAccessibilityElement, XCActivityRecord, XCElementSnapshot, XCTCapabilities;

@protocol XCTestManager_IDEInterface

Expand Down Expand Up @@ -43,6 +43,10 @@
- (id)_XCT_didBeginInitializingForUITesting;
- (id)_XCT_handleCrashReportData:(NSData *)arg1 fromFileWithName:(NSString *)arg2;

// iOS 14.x specific

- (id)_XCT_testRunnerReadyWithCapabilities:(XCTCapabilities *)arg1;

@optional
- (id)_XCT_testMethod:(NSString *)arg1 ofClass:(NSString *)arg2 didMeasureValues:(NSArray *)arg3 forPerformanceMetricID:(NSString *)arg4 name:(NSString *)arg5 withUnits:(NSString *)arg6 baselineName:(NSString *)arg7 baselineAverage:(NSNumber *)arg8 maxPercentRegression:(NSNumber *)arg9 maxPercentRelativeStandardDeviation:(NSNumber *)arg10 file:(NSString *)arg11 line:(NSNumber *)arg12;
- (id)_XCT_testBundleReady;
Expand Down
8 changes: 8 additions & 0 deletions XCTestBootstrap/TestManager/FBTestBundleConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ - (id)_XCT_initializationForUITestingDidFailWithError:(NSError *)error
return nil;
}

- (id)_XCT_testRunnerReadyWithCapabilities:(XCTCapabilities *)arg1
{
[self.logger logFormat:@"Test Bundle is Ready"];
self.state = FBTestBundleConnectionStateTestBundleReady;
[self.connectFuture resolveWithResult:FBTestBundleResult.success];
return nil;
}

@end

#pragma clang diagnostic pop
5 changes: 5 additions & 0 deletions XCTestBootstrap/TestManager/FBTestManagerAPIMediator.m
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ - (id)_XCT_testBundleReady
return [self handleUnimplementedXCTRequest:_cmd];
}

- (id)_XCT_testRunnerReadyWithCapabilities:(XCTCapabilities *)arg1
{
return [self handleUnimplementedXCTRequest:_cmd];
}

- (NSString *)unknownMessageForSelector:(SEL)aSelector
{
return [NSString stringWithFormat:@"Received call for unhandled method (%@). Probably you should have a look at _IDETestManagerAPIMediator in IDEFoundation.framework and implement it. Good luck!", NSStringFromSelector(aSelector)];
Expand Down

0 comments on commit 87b5c21

Please sign in to comment.