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
Expand Up @@ -105,7 +105,7 @@ is not statically available. The problematic overloads will also be deprecated:
-) where E: Error & Equatable
+) -> E where E: Error & Equatable

+@available(swift, introduced: 6.0, deprecated: 100000.0, message: "Examine the result of '#expect(throws:)' instead.")
+@available(swift, deprecated: 100000.0, message: "Examine the result of '#expect(throws:)' instead.")
+@discardableResult
@freestanding(expression) public macro expect<R>(
_ comment: @autoclosure () -> Comment? = nil,
Expand All @@ -115,7 +115,7 @@ is not statically available. The problematic overloads will also be deprecated:
-)
+) -> (any Error)?

+@available(swift, introduced: 6.0, deprecated: 100000.0, message: "Examine the result of '#require(throws:)' instead.")
+@available(swift, deprecated: 100000.0, message: "Examine the result of '#require(throws:)' instead.")
+@discardableResult
@freestanding(expression) public macro require<R>(
_ comment: @autoclosure () -> Comment? = nil,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Testing/Expectations/Expectation+Macro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public macro require<R>(
/// ``expect(throws:_:sourceLocation:performing:)-1hfms`` instead. If the thrown
/// error need only equal another instance of [`Error`](https://developer.apple.com/documentation/swift/error),
/// use ``expect(throws:_:sourceLocation:performing:)-7du1h`` instead.
@available(swift, introduced: 6.0, deprecated: 100000.0, message: "Examine the result of '#expect(throws:)' instead.")
@available(swift, deprecated: 100000.0, message: "Examine the result of '#expect(throws:)' instead.")
@discardableResult
@freestanding(expression) public macro expect<R>(
_ comment: @autoclosure () -> Comment? = nil,
Expand Down Expand Up @@ -427,7 +427,7 @@ public macro require<R>(
///
/// If `expression` should _never_ throw, simply invoke the code without using
/// this macro. The test will then fail if an error is thrown.
@available(swift, introduced: 6.0, deprecated: 100000.0, message: "Examine the result of '#require(throws:)' instead.")
@available(swift, deprecated: 100000.0, message: "Examine the result of '#require(throws:)' instead.")
@discardableResult
@freestanding(expression) public macro require<R>(
_ comment: @autoclosure () -> Comment? = nil,
Expand Down