diff --git a/Sources/Testing/Test+Cancellation.swift b/Sources/Testing/Test+Cancellation.swift index 5a4b425c7..e09ebc8d9 100644 --- a/Sources/Testing/Test+Cancellation.swift +++ b/Sources/Testing/Test+Cancellation.swift @@ -169,7 +169,8 @@ extension Test: TestCancellable { /// attribute the cancellation. /// /// - Throws: An error indicating that the current test or test case has been - /// cancelled. + /// cancelled. The testing library does not treat this error as a test + /// failure. /// /// The testing library runs each test and each test case in its own task. /// When you call this function, the testing library cancels the task @@ -206,7 +207,6 @@ extension Test: TestCancellable { /// - Important: If the current task is not associated with a test (for /// example, because it was created with [`Task.detached(name:priority:operation:)`](https://developer.apple.com/documentation/swift/task/detached(name:priority:operation:)-795w1)) /// this function records an issue and cancels the current task. - @_spi(Experimental) public static func cancel(_ comment: Comment? = nil, sourceLocation: SourceLocation = #_sourceLocation) throws -> Never { let skipInfo = SkipInfo(comment: comment, sourceContext: SourceContext(backtrace: nil, sourceLocation: sourceLocation)) try Self.cancel(with: skipInfo) diff --git a/Sources/Testing/Testing.docc/EnablingAndDisabling.md b/Sources/Testing/Testing.docc/EnablingAndDisabling.md index 7e3f31bde..9957dac68 100644 --- a/Sources/Testing/Testing.docc/EnablingAndDisabling.md +++ b/Sources/Testing/Testing.docc/EnablingAndDisabling.md @@ -121,19 +121,17 @@ func allIngredientsAvailable(for food: Food) -> Bool { ... } func makeSundae() async throws { ... } ``` - diff --git a/Sources/Testing/Testing.docc/MigratingFromXCTest.md b/Sources/Testing/Testing.docc/MigratingFromXCTest.md index 6b1d9f381..9f104d626 100644 --- a/Sources/Testing/Testing.docc/MigratingFromXCTest.md +++ b/Sources/Testing/Testing.docc/MigratingFromXCTest.md @@ -556,13 +556,9 @@ test function with an instance of this trait type to control whether it runs: } } - - ### Annotate known issues A test may have a known issue that sometimes or always prevents it from passing.