Skip to content

Commit 6faa720

Browse files
committed
Update docs
1 parent 0cbb74e commit 6faa720

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

Sources/Testing/ExitTests/ExitCondition.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ private import _TestingInternals
1414
/// succeed or fail.
1515
///
1616
/// Values of this type can be passed to
17-
/// ``expect(exitsWith:_:sourceLocation:performing:)`` or
18-
/// ``require(exitsWith:_:sourceLocation:performing:)`` to configure which exit
19-
/// statuses should be considered successful.
17+
/// ``expect(exitsWith:observing:_:sourceLocation:performing:)`` or
18+
/// ``require(exitsWith:observing:_:sourceLocation:performing:)`` to configure
19+
/// which exit statuses should be considered successful.
2020
@_spi(Experimental)
2121
#if SWT_NO_PROCESS_SPAWNING
2222
@available(*, unavailable, message: "Exit tests are not available on this platform.")

Sources/Testing/ExitTests/ExitTest.Result.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ extension ExitTest {
1515
/// A type representing the result of an exit test after it has exited and
1616
/// returned control to the calling test function.
1717
///
18-
/// Both ``expect(exitsWith:_:sourceLocation:performing:)`` and
19-
/// ``require(exitsWith:_:sourceLocation:performing:)`` return instances of
20-
/// this type.
18+
/// Both ``expect(exitsWith:observing:_:sourceLocation:performing:)`` and
19+
/// ``require(exitsWith:observing:_:sourceLocation:performing:)`` return
20+
/// instances of this type.
2121
public struct Result: Sendable {
2222
/// The exit condition the exit test exited with.
2323
///
2424
/// When the exit test passes, the value of this property is equal to the
2525
/// value of the `expectedExitCondition` argument passed to
26-
/// ``expect(exitsWith:_:sourceLocation:performing:)`` or to
27-
/// ``require(exitsWith:_:sourceLocation:performing:)``. You can compare two
28-
/// instances of ``ExitCondition`` with ``ExitCondition/==(lhs:rhs:)``.
26+
/// ``expect(exitsWith:observing:_:sourceLocation:performing:)`` or to
27+
/// ``require(exitsWith:observing:_:sourceLocation:performing:)``. You can
28+
/// compare two instances of ``ExitCondition`` with
29+
/// ``ExitCondition/==(lhs:rhs:)``.
2930
public var exitCondition: ExitCondition
3031

3132
/// All bytes written to the standard output stream of the exit test before
@@ -47,8 +48,8 @@ extension ExitTest {
4748
///
4849
/// To enable gathering output from the standard output stream during an
4950
/// exit test, pass `\.standardOutputContent` in the `observedValues`
50-
/// argument of ``expect(exitsWith:_:sourceLocation:performing:)`` or
51-
/// ``require(exitsWith:_:sourceLocation:performing:)``.
51+
/// argument of ``expect(exitsWith:observing:_:sourceLocation:performing:)``
52+
/// or ``require(exitsWith:observing:_:sourceLocation:performing:)``.
5253
///
5354
/// If the exit test could not be started or if you did not request standard
5455
/// output content, the value of this property is the empty array.
@@ -73,8 +74,8 @@ extension ExitTest {
7374
///
7475
/// To enable gathering output from the standard error stream during an exit
7576
/// test, pass `\.standardErrorContent` in the `observedValues` argument of
76-
/// ``expect(exitsWith:_:sourceLocation:performing:)`` or
77-
/// ``require(exitsWith:_:sourceLocation:performing:)``.
77+
/// ``expect(exitsWith:observing:_:sourceLocation:performing:)`` or
78+
/// ``require(exitsWith:observing:_:sourceLocation:performing:)``.
7879
///
7980
/// If the exit test could not be started or if you did not request standard
8081
/// error content, the value of this property is the empty array.

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,15 @@ extension ExitTest {
286286
/// the exit test.
287287
///
288288
/// This handler is invoked when an exit test (i.e. a call to either
289-
/// ``expect(exitsWith:_:sourceLocation:performing:)`` or
290-
/// ``require(exitsWith:_:sourceLocation:performing:)``) is started. The
291-
/// handler is responsible for initializing a new child environment (typically
292-
/// a child process) and running the exit test identified by `sourceLocation`
293-
/// there. The exit test's body can be found using ``ExitTest/find(at:)``.
289+
/// ``expect(exitsWith:observing:_:sourceLocation:performing:)`` or
290+
/// ``require(exitsWith:observing:_:sourceLocation:performing:)``) is started.
291+
/// The handler is responsible for initializing a new child environment
292+
/// (typically a child process) and running the exit test identified by
293+
/// `sourceLocation` there.
294+
///
295+
/// In the child environment, you can find the exit test again using
296+
/// ``ExitTest/find(at:)`` and can be run by calling
297+
/// ``ExitTest/callAsFunction()``.
294298
///
295299
/// The parent environment should suspend until the results of the exit test
296300
/// are available or the child environment is otherwise terminated. The parent

0 commit comments

Comments
 (0)