diff --git a/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved index 004a4d78ce31..8c9f1c19b828 100644 --- a/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -158,8 +158,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", "state" : { - "revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631", - "version" : "1.0.2" + "revision" : "b58e6627149808b40634c4552fcf2f44d0b3ca87", + "version" : "1.1.0" } } ], diff --git a/Package.swift b/Package.swift index 9b3a66b831b1..ba1f896c0ab1 100644 --- a/Package.swift +++ b/Package.swift @@ -27,7 +27,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swiftui-navigation", from: "1.1.0"), - .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.1.0"), ], targets: [ .target( diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 4541fa93ab63..fdcc04698271 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -30,7 +30,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.2.0"), .package(url: "https://github.com/pointfreeco/swiftui-navigation", from: "1.1.0"), - .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.0.0"), + .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.1.0"), ], targets: [ .target( diff --git a/Sources/ComposableArchitecture/TestStore.swift b/Sources/ComposableArchitecture/TestStore.swift index 0e2f4980e41c..4e01da6a0742 100644 --- a/Sources/ComposableArchitecture/TestStore.swift +++ b/Sources/ComposableArchitecture/TestStore.swift @@ -1042,7 +1042,7 @@ extension TestStore where State: Equatable { { var expectedWhenGivenPreviousState = current if let updateStateToExpectedResult = updateStateToExpectedResult { - _XCTExpectFailure(strict: false) { + XCTExpectFailure(strict: false) { do { try Dependencies.withDependencies { $0 = self.reducer.dependencies @@ -2077,7 +2077,7 @@ extension TestStore { case .on: XCTFail(message, file: file, line: line) case .off(showSkippedAssertions: true): - _XCTExpectFailure { + XCTExpectFailure { XCTFail( """ Skipped assertions: … @@ -2474,33 +2474,6 @@ public enum Exhaustivity: Equatable, Sendable { public static let off = Self.off(showSkippedAssertions: false) } -@_transparent -private func _XCTExpectFailure( - _ failureReason: String? = nil, - strict: Bool = true, - failingBlock: () -> Void -) { - #if DEBUG - guard - let XCTExpectedFailureOptions = NSClassFromString("XCTExpectedFailureOptions") - as Any as? NSObjectProtocol, - let options = strict - ? XCTExpectedFailureOptions - .perform(NSSelectorFromString("alloc"))?.takeUnretainedValue() - .perform(NSSelectorFromString("init"))?.takeUnretainedValue() - : XCTExpectedFailureOptions - .perform(NSSelectorFromString("nonStrictOptions"))?.takeUnretainedValue() - else { return } - - let XCTExpectFailureWithOptionsInBlock = unsafeBitCast( - dlsym(dlopen(nil, RTLD_LAZY), "XCTExpectFailureWithOptionsInBlock"), - to: (@convention(c) (String?, AnyObject, () -> Void) -> Void).self - ) - - XCTExpectFailureWithOptionsInBlock(failureReason, options, failingBlock) - #endif -} - extension TestStore { @MainActor @available(