Commit 5fd1afa
Add example for how to test any error is thrown in the error testing documentation article (#853)
I was stumped earlier when trying to find the details for how to test
that any error is thrown. This detail _is_ in the migrating from XCTest
content, but I landed on this page, and it seemed an odd miss,
especially given the history of ignoring the kind of error in many
cases. (I found my solution in [a post by Jonathan the
forums](https://forums.swift.org/t/swift-testing-whats-the-recommend-approach-to-test-throwing-function/70806/2).)
While it is duplicated content, this would have helped me - so I'm
proposing it for a documentation update. Happy to edit as y'all see fit.
---------
Co-authored-by: Stuart Montgomery <[email protected]>1 parent 228f0e6 commit 5fd1afa
File tree
1 file changed
+16
-0
lines changed- Sources/Testing/Testing.docc
1 file changed
+16
-0
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
| |||
0 commit comments