@@ -900,10 +900,7 @@ class ConvertActionTests: XCTestCase {
900
900
temporaryDirectory: testDataProvider. uniqueTemporaryDirectory ( ) )
901
901
let result = try action. perform ( logHandle: . none)
902
902
903
- XCTAssert (
904
- result. didEncounterError,
905
- " We expect errors to occur during during conversion of the bad test bundle. "
906
- )
903
+ XCTAssertFalse ( result. didEncounterError, " The issues with this test bundle are not severe enough to fail the build. " )
907
904
908
905
// Verify that the build output folder from the former successful conversion
909
906
// still exists after this failure.
@@ -945,7 +942,7 @@ class ConvertActionTests: XCTestCase {
945
942
Digest . Diagnostic (
946
943
start: nil ,
947
944
source: nil ,
948
- severity: . error ,
945
+ severity: . warning ,
949
946
summary: " Source symbol 's:5MyKit0A5ProtocolP' not found locally, from 'conformsTo' relationship to 's:5Foundation0A5EarhartP' " ,
950
947
explanation: """
951
948
The " source " of a symbol graph relationship should always refer to a symbol in the same symbol graph file.
@@ -2421,8 +2418,8 @@ class ConvertActionTests: XCTestCase {
2421
2418
)
2422
2419
let result = try action. perform ( logHandle: . none)
2423
2420
2424
- XCTAssertEqual ( engine. problems. count, 1 , " \( ConvertAction . self) didn't filter out diagnostics above the 'error' level. " )
2425
- XCTAssert ( result. didEncounterError)
2421
+ XCTAssertEqual ( engine. problems. count, 0 , " \( ConvertAction . self) didn't filter out diagnostics at-or- above the 'error' level. " )
2422
+ XCTAssertFalse ( result. didEncounterError, " The issues with this test bundle are not severe enough to fail the build. " )
2426
2423
}
2427
2424
2428
2425
func testDiagnosticLevelIgnoredWhenAnalyzeIsPresent( ) throws {
@@ -2461,7 +2458,7 @@ class ConvertActionTests: XCTestCase {
2461
2458
2462
2459
XCTAssertEqual ( engine. problems. count, 2 , " \( ConvertAction . self) shouldn't filter out diagnostics when the '--analyze' flag is passed " )
2463
2460
XCTAssertEqual ( engine. problems. map { $0. diagnostic. identifier } , [ " org.swift.docc.Article.Title.NotFound " , " org.swift.docc.SymbolNodeNotFound " ] )
2464
- XCTAssert ( result. didEncounterError)
2461
+ XCTAssertFalse ( result. didEncounterError, " The issues with this test bundle are not severe enough to fail the build. " )
2465
2462
XCTAssert ( engine. problems. contains ( where: { $0. diagnostic. severity == . warning } ) )
2466
2463
}
2467
2464
@@ -2495,9 +2492,7 @@ class ConvertActionTests: XCTestCase {
2495
2492
temporaryDirectory: testDataProvider. uniqueTemporaryDirectory ( ) ,
2496
2493
diagnosticLevel: " error "
2497
2494
)
2498
- XCTAssertThrowsError ( try action. performAndHandleResult ( logHandle: . none) ) { error in
2499
- XCTAssert ( error is ErrorsEncountered , " Unexpected error type thrown by \( ConvertAction . self) " )
2500
- }
2495
+ XCTAssertNoThrow ( try action. performAndHandleResult ( logHandle: . none) )
2501
2496
}
2502
2497
2503
2498
func testWritesDiagnosticFileWhenThrowingError( ) throws {
@@ -2537,9 +2532,7 @@ class ConvertActionTests: XCTestCase {
2537
2532
2538
2533
// TODO: Support TestFileSystem in DiagnosticFileWriter
2539
2534
XCTAssertFalse ( FileManager . default. fileExists ( atPath: diagnosticFile. path) , " Diagnostic file doesn't exist before " )
2540
- XCTAssertThrowsError ( try action. performAndHandleResult ( logHandle: . none) ) { error in
2541
- XCTAssert ( error is ErrorsEncountered , " Unexpected error type thrown by \( ConvertAction . self) " )
2542
- }
2535
+ XCTAssertNoThrow ( try action. performAndHandleResult ( logHandle: . none) )
2543
2536
XCTAssertTrue ( FileManager . default. fileExists ( atPath: diagnosticFile. path) , " Diagnostic file exist after " )
2544
2537
}
2545
2538
@@ -2612,7 +2605,7 @@ class ConvertActionTests: XCTestCase {
2612
2605
temporaryDirectory: testDataProvider. uniqueTemporaryDirectory ( )
2613
2606
)
2614
2607
2615
- XCTAssertThrowsError ( try action. performAndHandleResult ( logHandle: . none) , " The test bundle should have thrown an error about an incomplete symbol graph file " )
2608
+ XCTAssertNoThrow ( try action. performAndHandleResult ( logHandle: . none) )
2616
2609
XCTAssert ( testDataProvider. fileExists ( atPath: digestFileURL. path) , " The digest file should have been written even though compilation errors occurred " )
2617
2610
2618
2611
let data = try testDataProvider. contentsOfURL ( digestFileURL)
0 commit comments