-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
One of the first enhancement requests we received for swift-testing was the ability to test for precondition failures and other critical failures that terminate the current process when they occur. This feature is also frequently requested for XCTest. With swift-testing, we have the opportunity to build such a feature in an ergonomic way. Read the full proposal [here](https://github.com/apple/swift-testing/blob/jgrynspan/exit-tests-proposal/Documentation/Proposals/NNNN-exit-tests.md).
- Loading branch information
Showing
24 changed files
with
1,003 additions
and
16 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...Testing/Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitCondition`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...ting/Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_!=.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``/Swift/Optional/!=(_:_:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...ing/Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_!==.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``/Swift/Optional/!==(_:_:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...ting/Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_==.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``/Swift/Optional/==(_:_:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...ing/Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_===.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``/Swift/Optional/===(_:_:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...esting.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_exitCode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitCondition/exitCode(_:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_failure.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitCondition/failure`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
.../Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_signal.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitCondition/signal(_:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...Testing.docc/AvailabilityStubs/ExitTests/ExitCondition/ExitCondition_success.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitCondition/success`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...Testing.docc/AvailabilityStubs/ExitTests/ExitTestArtifacts/ExitTestArtifacts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitTestArtifacts`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...vailabilityStubs/ExitTests/ExitTestArtifacts/ExitTestArtifacts_exitCondition.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitTestArtifacts/exitCondition`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...lityStubs/ExitTests/ExitTestArtifacts/ExitTestArtifacts_standardErrorContent.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitTestArtifacts/standardErrorContent`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
...ityStubs/ExitTests/ExitTestArtifacts/ExitTestArtifacts_standardOutputContent.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/ExitTestArtifacts/standardOutputContent`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
16 changes: 16 additions & 0 deletions
16
Sources/Testing/Testing.docc/AvailabilityStubs/ExitTests/ExpectExitsWith.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ``Testing/expect(exitsWith:observing:_:sourceLocation:performing:)`` | ||
|
||
<!-- | ||
This source file is part of the Swift.org open source project | ||
Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
Licensed under Apache License v2.0 with Runtime Library Exception | ||
See https://swift.org/LICENSE.txt for license information | ||
See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
--> | ||
|
||
@Metadata { | ||
@Available(Xcode, introduced: 999.0) | ||
@Available(Swift, introduced: 999.0) | ||
} |
Oops, something went wrong.