Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
# ``XCTestDynamicOverlay/XCTUnimplemented(_:placeholder:file:line:)-l4v2``
# ``XCTestDynamicOverlay/XCTUnimplemented(_:placeholder:)-1ho66``

## Topics

### Overloads

- ``XCTUnimplemented(_:placeholder:file:line:)-4cefg``
- ``XCTUnimplemented(_:placeholder:file:line:)-50but``
- ``XCTUnimplemented(_:placeholder:file:line:)-2jqzu``
- ``XCTUnimplemented(_:placeholder:file:line:)-9mvva``
- ``XCTUnimplemented(_:placeholder:file:line:)-92nev``
- ``XCTUnimplemented(_:placeholder:file:line:)-6wlpq``
- ``XCTUnimplemented(_:placeholder:file:line:)-97hr8``
- ``XCTUnimplemented(_:placeholder:file:line:)-qhqq``
- ``XCTUnimplemented(_:placeholder:file:line:)-4akkm``
- ``XCTUnimplemented(_:placeholder:file:line:)-5i77i``
- ``XCTUnimplemented(_:placeholder:file:line:)-4xhs3``
- ``XCTUnimplemented(_:placeholder:)-2e3z9``
- ``XCTUnimplemented(_:file:line:)-3d9bq``
- ``XCTUnimplemented(_:placeholder:)-7zq1m``
- ``XCTUnimplemented(_:file:line:)-2v7cw``
- ``XCTUnimplemented(_:file:line:)-5k1u``
- ``XCTUnimplemented(_:placeholder:)-f6km``
- ``XCTUnimplemented(_:file:line:)-9nzey``
- ``XCTUnimplemented(_:placeholder:)-55i4t``
- ``XCTUnimplemented(_:file:line:)-3okct``
- ``XCTUnimplemented(_:placeholder:)-8sn8``
- ``XCTUnimplemented(_:file:line:)-s7bl``
- ``XCTUnimplemented(_:placeholder:)-1nulk``
- ``XCTUnimplemented(_:file:line:)-1x268``
- ``XCTUnimplemented(_:placeholder:)-mbpz``
- ``XCTUnimplemented(_:file:line:)-6qpy4``
- ``XCTUnimplemented(_:placeholder:)-437q7``
- ``XCTUnimplemented(_:file:line:)-8c1gm``
- ``XCTUnimplemented(_:placeholder:)-k1by``
- ``XCTUnimplemented(_:file:line:)-63m0r``
- ``XCTUnimplemented(_:placeholder:)-r87l``
- ``XCTUnimplemented(_:file:line:)-4njow``
- ``XCTUnimplemented(_:placeholder:)-6e4ct``
- ``XCTUnimplemented(_:file:line:)-8w02g``
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ XCTest Dynamic Overlay provides APIs for invoking XCTest's `XCTFail` directly in

### Unimplemented Dependencies

- ``XCTUnimplemented(_:placeholder:file:line:)-l4v2``
- ``XCTUnimplemented(_:placeholder:)-1ho66``
- ``XCTUnimplemented(_:)-3obl5``
168 changes: 144 additions & 24 deletions Sources/XCTestDynamicOverlay/XCTUnimplemented.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
@_disfavoredOverload
public func XCTUnimplemented<Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable () -> Result {
return {
_fail(description(), nil)
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable () -> Result {
return {
let description = description()
_fail(description, nil)
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -19,14 +29,24 @@ public func XCTUnimplemented<Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A) -> Result {
return {
_fail(description(), $0)
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A) -> Result {
return {
let description = description()
_fail(description, $0)
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -35,14 +55,24 @@ public func XCTUnimplemented<A, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B) -> Result {
return {
_fail(description(), ($0, $1))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B) -> Result {
return {
let description = description()
_fail(description, ($0, $1))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -51,14 +81,24 @@ public func XCTUnimplemented<A, B, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, C, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B, C) -> Result {
return {
_fail(description(), ($0, $1, $2))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, C, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B, C) -> Result {
return {
let description = description()
_fail(description, ($0, $1, $2))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -67,14 +107,24 @@ public func XCTUnimplemented<A, B, C, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B, C, D) -> Result {
return {
_fail(description(), ($0, $1, $2, $3))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B, C, D) -> Result {
return {
let description = description()
_fail(description, ($0, $1, $2, $3))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -83,14 +133,24 @@ public func XCTUnimplemented<A, B, C, D, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, E, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B, C, D, E) -> Result {
return {
_fail(description(), ($0, $1, $2, $3, $4))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, E, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B, C, D, E) -> Result {
return {
let description = description()
_fail(description, ($0, $1, $2, $3, $4))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand Down Expand Up @@ -163,14 +223,24 @@ public func XCTUnimplemented<A, B, C, D, E, Result>(
@_disfavoredOverload
public func XCTUnimplemented<Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable () async -> Result {
return {
_fail(description(), nil)
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable () async -> Result {
return {
let description = description()
_fail(description, nil)
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -188,14 +258,24 @@ public func XCTUnimplemented<Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A) async -> Result {
return {
_fail(description(), $0)
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A) async -> Result {
return {
let description = description()
_fail(description, $0)
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -204,14 +284,24 @@ public func XCTUnimplemented<A, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B) async -> Result {
return {
_fail(description(), ($0, $1))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B) async -> Result {
return {
let description = description()
_fail(description, ($0, $1))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -220,14 +310,24 @@ public func XCTUnimplemented<A, B, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, C, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B, C) async -> Result {
return {
_fail(description(), ($0, $1, $2))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, C, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B, C) async -> Result {
return {
let description = description()
_fail(description, ($0, $1, $2))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -236,14 +336,24 @@ public func XCTUnimplemented<A, B, C, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B, C, D) async -> Result {
return {
_fail(description(), ($0, $1, $2, $3))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B, C, D) async -> Result {
return {
let description = description()
_fail(description, ($0, $1, $2, $3))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand All @@ -252,14 +362,24 @@ public func XCTUnimplemented<A, B, C, D, Result>(
@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, E, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
placeholder: @autoclosure @escaping @Sendable () -> Result? = nil,
placeholder: @autoclosure @escaping @Sendable () -> Result
) -> @Sendable (A, B, C, D, E) async -> Result {
return {
_fail(description(), ($0, $1, $2, $3, $4))
return placeholder()
}
}

@_disfavoredOverload
public func XCTUnimplemented<A, B, C, D, E, Result>(
_ description: @autoclosure @escaping @Sendable () -> String = "",
file: StaticString = #file,
line: UInt = #line
) -> @Sendable (A, B, C, D, E) async -> Result {
return {
let description = description()
_fail(description, ($0, $1, $2, $3, $4))
guard let placeholder = placeholder() ?? _generatePlaceholder()
guard let placeholder: Result = _generatePlaceholder()
else { _unimplementedFatalError(description, file: file, line: line) }
return placeholder
}
Expand Down