diff --git a/Package.resolved b/Package.resolved index 576156e..e748480 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,12 +1,12 @@ { "pins" : [ { - "identity" : "swift-issue-reporting", + "identity" : "xctest-dynamic-overlay", "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-issue-reporting.git", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay.git", "state" : { - "revision" : "357ca1e5dd31f613a1d43320870ebc219386a495", - "version" : "1.2.2" + "revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631", + "version" : "1.0.2" } } ], diff --git a/Package.swift b/Package.swift index 18bc4c1..0e1394a 100644 --- a/Package.swift +++ b/Package.swift @@ -18,7 +18,7 @@ let package = Package( ], dependencies: [ .package( - url: "https://github.com/pointfreeco/swift-issue-reporting", + url: "https://github.com/pointfreeco/xctest-dynamic-overlay.git", "0.9.0"..<"2.0.0" ), ], @@ -26,7 +26,7 @@ let package = Package( .target( name: "ComposableCoreLocation", dependencies: [ - .product(name: "IssueReporting", package: "swift-issue-reporting"), + .product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"), ] ), .testTarget( diff --git a/Sources/ComposableCoreLocation/Failing.swift b/Sources/ComposableCoreLocation/Failing.swift index 84e6131..a69f57b 100644 --- a/Sources/ComposableCoreLocation/Failing.swift +++ b/Sources/ComposableCoreLocation/Failing.swift @@ -1,10 +1,10 @@ import Combine import CoreLocation -import IssueReporting +import XCTestDynamicOverlay extension LocationManager { /// The failing implementation of the ``LocationManager`` interface. By default this - /// implementation stubs all of its endpoints as functions that immediately call `reportIssue`. + /// implementation stubs all of its endpoints as functions that immediately call `XCTFail`. /// /// This allows you to test an even deeper property of your features: that they use only the /// location manager endpoints that you specify and nothing else. This can be useful as a @@ -39,11 +39,11 @@ extension LocationManager { /// ``` public static let failing = Self( accuracyAuthorization: { - reportIssue("A failing endpoint was accessed: 'LocationManager.accuracyAuthorization'") + XCTFail("A failing endpoint was accessed: 'LocationManager.accuracyAuthorization'") return nil }, authorizationStatus: { - reportIssue("A failing endpoint was accessed: 'LocationManager.authorizationStatus'") + XCTFail("A failing endpoint was accessed: 'LocationManager.authorizationStatus'") return .notDetermined }, delegate: { .unimplemented("LocationManager.delegate") }, @@ -51,31 +51,31 @@ extension LocationManager { .unimplemented("LocationManager.dismissHeadingCalibrationDisplay") }, heading: { - reportIssue("A failing endpoint was accessed: 'LocationManager.heading'") + XCTFail("A failing endpoint was accessed: 'LocationManager.heading'") return nil }, headingAvailable: { - reportIssue("A failing endpoint was accessed: 'LocationManager.headingAvailable'") + XCTFail("A failing endpoint was accessed: 'LocationManager.headingAvailable'") return false }, isRangingAvailable: { - reportIssue("A failing endpoint was accessed: 'LocationManager.isRangingAvailable'") + XCTFail("A failing endpoint was accessed: 'LocationManager.isRangingAvailable'") return false }, location: { - reportIssue("A failing endpoint was accessed: 'LocationManager.location'") + XCTFail("A failing endpoint was accessed: 'LocationManager.location'") return nil }, locationServicesEnabled: { - reportIssue("A failing endpoint was accessed: 'LocationManager.locationServicesEnabled'") + XCTFail("A failing endpoint was accessed: 'LocationManager.locationServicesEnabled'") return false }, maximumRegionMonitoringDistance: { - reportIssue("A failing endpoint was accessed: 'LocationManager.maximumRegionMonitoringDistance'") + XCTFail("A failing endpoint was accessed: 'LocationManager.maximumRegionMonitoringDistance'") return CLLocationDistanceMax }, monitoredRegions: { - reportIssue("A failing endpoint was accessed: 'LocationManager.monitoredRegions'") + XCTFail("A failing endpoint was accessed: 'LocationManager.monitoredRegions'") return [] }, requestAlwaysAuthorization: { .unimplemented("LocationManager.requestAlwaysAuthorization") }, @@ -88,7 +88,7 @@ extension LocationManager { }, set: { _ in .unimplemented("LocationManager.set") }, significantLocationChangeMonitoringAvailable: { - reportIssue() + XCTFail() return false }, startMonitoringForRegion: { _ in .unimplemented("LocationManager.startMonitoringForRegion") }, diff --git a/Sources/ComposableCoreLocation/Internal/Publisher+Extensions.swift b/Sources/ComposableCoreLocation/Internal/Publisher+Extensions.swift index 3709459..6b8b742 100644 --- a/Sources/ComposableCoreLocation/Internal/Publisher+Extensions.swift +++ b/Sources/ComposableCoreLocation/Internal/Publisher+Extensions.swift @@ -1,10 +1,10 @@ import Combine -import IssueReporting +import XCTestDynamicOverlay extension AnyPublisher { - static func unimplemented(_ prefix: String, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line) -> Self { + static func unimplemented(_ prefix: String, file: StaticString = #file, line: UInt = #line) -> Self { .fireAndForget { - reportIssue("\(prefix.isEmpty ? "" : "\(prefix) - ")An unimplemented publisher ran.", fileID: fileID, filePath: filePath, line: line) + XCTFail("\(prefix.isEmpty ? "" : "\(prefix) - ")An unimplemented publisher ran.", file: file, line: line) } }