Skip to content

Commit 651ee9c

Browse files
authored
Tests: use XCTUnwrap over forced unwrappng (#619)
Failure to unwrap would trigger an assertion failure whereas the use of `XCTUnwrap` will fail the test case and permit the remainder of the test suite to be processed. This allows us to better understand the state of the test suite coverage when porting.
1 parent cf83a80 commit 651ee9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@ let expected = """
25482548
subdirectory: "Test Resources")!),
25492549
]).write(inside: tempURL)
25502550

2551-
let (_, _, context) = try! loadBundle(from: bundleURL)
2551+
let (_, _, context) = try XCTUnwrap(loadBundle(from: bundleURL))
25522552

25532553
// MissingDocs contains a struct that has a link to a non-existent type.
25542554
// If there are no problems, that indicates that symbol graph link

0 commit comments

Comments
 (0)