From 6cf2de8d6d1c417c4a8a2aed52ef234a790f1fd3 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Tue, 23 Jan 2024 09:50:59 -0800 Subject: [PATCH] wip --- .../TestHelpers.swift | 56 ++++++++++--------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/Tests/XCTestDynamicOverlayTests/TestHelpers.swift b/Tests/XCTestDynamicOverlayTests/TestHelpers.swift index 49e25c87..2d6df0d1 100644 --- a/Tests/XCTestDynamicOverlayTests/TestHelpers.swift +++ b/Tests/XCTestDynamicOverlayTests/TestHelpers.swift @@ -5,35 +5,37 @@ func MyXCTFail(_ message: String) { XCTFail(message) } -func MyXCTExpectFailure( - _ failureReason: String, - enabled: Bool = true, - strict: Bool = true, - failingBlock: () -> Void, - issueMatcher: ((_XCTIssue) -> Bool)? = nil -) { - XCTExpectFailure( - failureReason, - enabled: enabled, - strict: strict, - failingBlock: failingBlock, - issueMatcher: issueMatcher - ) -} +#if canImport(ObjectiveC) + func MyXCTExpectFailure( + _ failureReason: String, + enabled: Bool = true, + strict: Bool = true, + failingBlock: () -> Void, + issueMatcher: ((_XCTIssue) -> Bool)? = nil + ) { + XCTExpectFailure( + failureReason, + enabled: enabled, + strict: strict, + failingBlock: failingBlock, + issueMatcher: issueMatcher + ) + } -func MyXCTExpectFailure( - _ failureReason: String, - enabled: Bool = true, - strict: Bool = true, - issueMatcher: ((_XCTIssue) -> Bool)? = nil -) { - XCTExpectFailure( - failureReason, - enabled: enabled, - strict: strict, - issueMatcher: issueMatcher - ) + func MyXCTExpectFailure( + _ failureReason: String, + enabled: Bool = true, + strict: Bool = true, + issueMatcher: ((_XCTIssue) -> Bool)? = nil + ) { + XCTExpectFailure( + failureReason, + enabled: enabled, + strict: strict, + issueMatcher: issueMatcher + ) } +#endif struct Client { var p00: () -> Int