Skip to content

Commit ad71962

Browse files
committed
Update to latest issue reporting library
1 parent 8d5745c commit ad71962

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

Package.resolved

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ let package = Package(
1818
],
1919
dependencies: [
2020
.package(
21-
url: "https://github.com/pointfreeco/xctest-dynamic-overlay.git",
21+
url: "https://github.com/pointfreeco/swift-issue-reporting",
2222
"0.9.0"..<"2.0.0"
2323
),
2424
],
2525
targets: [
2626
.target(
2727
name: "ComposableCoreLocation",
2828
dependencies: [
29-
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay"),
29+
.product(name: "IssueReporting", package: "swift-issue-reporting"),
3030
]
3131
),
3232
.testTarget(

Sources/ComposableCoreLocation/Failing.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Combine
22
import CoreLocation
3-
import XCTestDynamicOverlay
3+
import IssueReporting
44

55
extension LocationManager {
66
/// The failing implementation of the ``LocationManager`` interface. By default this
7-
/// implementation stubs all of its endpoints as functions that immediately call `XCTFail`.
7+
/// implementation stubs all of its endpoints as functions that immediately call `reportIssue`.
88
///
99
/// This allows you to test an even deeper property of your features: that they use only the
1010
/// location manager endpoints that you specify and nothing else. This can be useful as a
@@ -39,43 +39,43 @@ extension LocationManager {
3939
/// ```
4040
public static let failing = Self(
4141
accuracyAuthorization: {
42-
XCTFail("A failing endpoint was accessed: 'LocationManager.accuracyAuthorization'")
42+
reportIssue("A failing endpoint was accessed: 'LocationManager.accuracyAuthorization'")
4343
return nil
4444
},
4545
authorizationStatus: {
46-
XCTFail("A failing endpoint was accessed: 'LocationManager.authorizationStatus'")
46+
reportIssue("A failing endpoint was accessed: 'LocationManager.authorizationStatus'")
4747
return .notDetermined
4848
},
4949
delegate: { .unimplemented("LocationManager.delegate") },
5050
dismissHeadingCalibrationDisplay: {
5151
.unimplemented("LocationManager.dismissHeadingCalibrationDisplay")
5252
},
5353
heading: {
54-
XCTFail("A failing endpoint was accessed: 'LocationManager.heading'")
54+
reportIssue("A failing endpoint was accessed: 'LocationManager.heading'")
5555
return nil
5656
},
5757
headingAvailable: {
58-
XCTFail("A failing endpoint was accessed: 'LocationManager.headingAvailable'")
58+
reportIssue("A failing endpoint was accessed: 'LocationManager.headingAvailable'")
5959
return false
6060
},
6161
isRangingAvailable: {
62-
XCTFail("A failing endpoint was accessed: 'LocationManager.isRangingAvailable'")
62+
reportIssue("A failing endpoint was accessed: 'LocationManager.isRangingAvailable'")
6363
return false
6464
},
6565
location: {
66-
XCTFail("A failing endpoint was accessed: 'LocationManager.location'")
66+
reportIssue("A failing endpoint was accessed: 'LocationManager.location'")
6767
return nil
6868
},
6969
locationServicesEnabled: {
70-
XCTFail("A failing endpoint was accessed: 'LocationManager.locationServicesEnabled'")
70+
reportIssue("A failing endpoint was accessed: 'LocationManager.locationServicesEnabled'")
7171
return false
7272
},
7373
maximumRegionMonitoringDistance: {
74-
XCTFail("A failing endpoint was accessed: 'LocationManager.maximumRegionMonitoringDistance'")
74+
reportIssue("A failing endpoint was accessed: 'LocationManager.maximumRegionMonitoringDistance'")
7575
return CLLocationDistanceMax
7676
},
7777
monitoredRegions: {
78-
XCTFail("A failing endpoint was accessed: 'LocationManager.monitoredRegions'")
78+
reportIssue("A failing endpoint was accessed: 'LocationManager.monitoredRegions'")
7979
return []
8080
},
8181
requestAlwaysAuthorization: { .unimplemented("LocationManager.requestAlwaysAuthorization") },
@@ -88,7 +88,7 @@ extension LocationManager {
8888
},
8989
set: { _ in .unimplemented("LocationManager.set") },
9090
significantLocationChangeMonitoringAvailable: {
91-
XCTFail()
91+
reportIssue()
9292
return false
9393
},
9494
startMonitoringForRegion: { _ in .unimplemented("LocationManager.startMonitoringForRegion") },

Sources/ComposableCoreLocation/Internal/Publisher+Extensions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Combine
2-
import XCTestDynamicOverlay
2+
import IssueReporting
33

44
extension AnyPublisher {
5-
static func unimplemented(_ prefix: String, file: StaticString = #file, line: UInt = #line) -> Self {
5+
static func unimplemented(_ prefix: String, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line) -> Self {
66
.fireAndForget {
7-
XCTFail("\(prefix.isEmpty ? "" : "\(prefix) - ")An unimplemented publisher ran.", file: file, line: line)
7+
reportIssue("\(prefix.isEmpty ? "" : "\(prefix) - ")An unimplemented publisher ran.", fileID: fileID, filePath: filePath, line: line)
88
}
99
}
1010

0 commit comments

Comments
 (0)