From 826c821810dd877a10e7b1f803b6f099d4b69447 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 31 May 2023 18:16:27 -0700 Subject: [PATCH] Tests: use `XCTUnwrap` over forced unwrappng Failure to unwrap would trigger an assertioin 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. --- .../DocumentationContext/DocumentationContextTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift b/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift index 2d89cd1af3..8236cb4097 100644 --- a/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift +++ b/Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift @@ -2548,7 +2548,7 @@ let expected = """ subdirectory: "Test Resources")!), ]).write(inside: tempURL) - let (_, _, context) = try! loadBundle(from: bundleURL) + let (_, _, context) = try XCTUnwrap(loadBundle(from: bundleURL)) // MissingDocs contains a struct that has a link to a non-existent type. // If there are no problems, that indicates that symbol graph link