@attached(peer) macro Test<C>(_ displayName: String? = nil, _ traits: any TestTrait..., arguments collection: C) where C : Collection, C : Sendable, C.Element : Sendable
Declare a test parameterized over a collection of values.
@attached(peer) macro Test<C1, C2>(_ displayName: String? = nil, _ traits: any TestTrait..., arguments collection1: C1, _ collection2: C2) where C1 : Collection, C1 : Sendable, C2 : Collection, C2 : Sendable, C1.Element : Sendable, C2.Element : Sendable
Declare a test parameterized over two collections of values.
@attached(peer) macro Test<C1, C2>(_ displayName: String? = nil, _ traits: any TestTrait..., arguments zippedCollections: Zip2Sequence<C1, C2>) where C1 : Collection, C1 : Sendable, C2 : Collection, C2 : Sendable, C1.Element : Sendable, C2.Element : Sendable
Declare a test parameterized over two zipped collections of values.
func __checkBinaryOperation<T>(_ lhs: T?, _ op: (T?, () -> T?) -> T?, _ rhs: @autoclosure () -> T?, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<T, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkBinaryOperation(_ lhs: String, _ op: (String, () -> String) -> Bool, _ rhs: @autoclosure () -> String, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkBinaryOperation<T, U>(_ lhs: T, _ op: (T, () -> U) -> Bool, _ rhs: @autoclosure () -> U, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkBinaryOperation<T>(_ lhs: T, _ op: (T, () -> T) -> Bool, _ rhs: @autoclosure () -> T, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error> where T : BidirectionalCollection, T.Element : Equatable
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkCast<V, T>(_ value: V, as _: T.Type, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<T, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkCast<V, T>(_ value: V, is _: T.Type, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkClosureCall(exitsWith expectedExitCondition: ExitCondition, performing body: @convention(thin) () async -> Void, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) async -> Result<Void, any Error>
Check that an expression always exits (terminates the current process) with a given status.
func __checkClosureCall<R>(performing body: () async throws -> sending R, throws errorMatcher: (any Error) async throws -> Bool, mismatchExplanation: ((any Error) -> String)? = nil, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation) async -> Result<Void, any Error>
Check that an expression always throws an error.
func __checkClosureCall<R>(performing body: () throws -> R, throws errorMatcher: (any Error) throws -> Bool, mismatchExplanation: ((any Error) -> String)? = nil, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expression always throws an error.
func __checkClosureCall(throws _: Never.Type, performing body: () async throws -> sending some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation) async -> Result<Void, any Error>
Check that an expression never throws an error.
func __checkClosureCall<E>(throws error: E, performing body: () async throws -> sending some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation) async -> Result<Void, any Error> where E : Equatable, E : Error
Check that an expression always throws an error.
func __checkClosureCall<E>(throws errorType: E.Type, performing body: () async throws -> sending some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation) async -> Result<Void, any Error> where E : Error
Check that an expression always throws an error.
func __checkClosureCall(throws _: Never.Type, performing body: () throws -> some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expression never throws an error.
func __checkClosureCall<E>(throws error: E, performing body: () throws -> some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error> where E : Equatable, E : Error
Check that an expression always throws an error.
func __checkClosureCall<E>(throws errorType: E.Type, performing body: () throws -> some Any, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error> where E : Error
Check that an expression always throws an error.
func __checkFunctionCall<T, Arg0, Arg1, Arg2, Arg3, R>(_ lhs: T, calling functionCall: (T, Arg0, Arg1, Arg2, Arg3) throws -> R?, _ argument0: Arg0, _ argument1: Arg1, _ argument2: Arg2, _ argument3: Arg3, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<R, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0, Arg1, Arg2, Arg3>(_ lhs: T, calling functionCall: (T, Arg0, Arg1, Arg2, Arg3) throws -> Bool, _ argument0: Arg0, _ argument1: Arg1, _ argument2: Arg2, _ argument3: Arg3, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0, Arg1, Arg2, R>(_ lhs: T, calling functionCall: (T, Arg0, Arg1, Arg2) throws -> R?, _ argument0: Arg0, _ argument1: Arg1, _ argument2: Arg2, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<R, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0, Arg1, Arg2>(_ lhs: T, calling functionCall: (T, Arg0, Arg1, Arg2) throws -> Bool, _ argument0: Arg0, _ argument1: Arg1, _ argument2: Arg2, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0, Arg1, R>(_ lhs: T, calling functionCall: (T, Arg0, Arg1) throws -> R?, _ argument0: Arg0, _ argument1: Arg1, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<R, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0, Arg1>(_ lhs: T, calling functionCall: (T, Arg0, Arg1) throws -> Bool, _ argument0: Arg0, _ argument1: Arg1, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, each U, R>(_ lhs: T, calling functionCall: (T, repeat each U) throws -> R?, _ arguments: repeat each U, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<R, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0, R>(_ lhs: T, calling functionCall: (T, Arg0) throws -> R?, _ argument0: Arg0, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<R, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, each U>(_ lhs: T, calling functionCall: (T, repeat each U) throws -> Bool, _ arguments: repeat each U, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkFunctionCall<T, Arg0>(_ lhs: T, calling functionCall: (T, Arg0) throws -> Bool, _ argument0: Arg0, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkInoutFunctionCall<T, U, R>(_ lhs: T, calling functionCall: (T, inout U) throws -> R?, _ arguments: inout U, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<R, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkInoutFunctionCall<T, U>(_ lhs: T, calling functionCall: (T, inout U) throws -> Bool, _ arguments: inout U, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) rethrows -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkPropertyAccess<T, U>(_ lhs: T, getting memberAccess: (T) -> U?, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<U, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkPropertyAccess<T>(_ lhs: T, getting memberAccess: (T) -> Bool, expression: __Expression, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkValue<T>(_ optionalValue: T?, expression: __Expression, expressionWithCapturedRuntimeValues: @autoclosure () -> __Expression? = nil, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<T, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func __checkValue(_ condition: Bool, expression: __Expression, expressionWithCapturedRuntimeValues: @autoclosure () -> __Expression? = nil, mismatchedErrorDescription: @autoclosure () -> String? = nil, difference: @autoclosure () -> String? = nil, mismatchedExitConditionDescription: @autoclosure () -> String? = nil, comments: @autoclosure () -> [Comment], isRequired: Bool, sourceLocation: SourceLocation) -> Result<Void, any Error>
Check that an expectation has passed after a condition has been evaluated and throw an error if it failed.
func confirmation<R>(_ comment: Comment? = nil, expectedCount: Int = 1, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation = #_sourceLocation, _ body: (Confirmation) async throws -> sending R) async rethrows -> R
Confirm that some event occurs during the invocation of a function.
func confirmation<R>(_ comment: Comment? = nil, expectedCount: some Confirmation.ExpectedCount, isolation: isolated (any Actor)? = #isolation, sourceLocation: SourceLocation = #_sourceLocation, _ body: (Confirmation) async throws -> sending R) async rethrows -> R
Confirm that some event occurs during the invocation of a function.
@freestanding(expression) macro expect(exitsWith expectedExitCondition: ExitCondition, _ comment: @autoclosure () -> Comment? = nil, sourceLocation: SourceLocation = #_sourceLocation, performing expression: @convention(thin) () async throws -> Void)
Check that an expression causes the process to terminate in a given fashion.
@freestanding(expression) macro require(exitsWith expectedExitCondition: ExitCondition, _ comment: @autoclosure () -> Comment? = nil, sourceLocation: SourceLocation = #_sourceLocation, performing expression: @convention(thin) () async -> Void)
Check that an expression causes the process to terminate in a given fashion and throw an error if it did not.