@@ -61,27 +61,41 @@ final class FunctionTests: XCTestCase {
6161 let source = #"""
6262 func executeOrder66() {}
6363 func executeOrder66() throws {}
64+ func executeOrder66() throws(SpecificErrorType) {}
6465 func executeOrder66() async {}
6566 func executeOrder66() async throws {}
67+ func executeOrder66() async throws(SpecificErrorType) {}
6668 """#
6769 instanceUnderTest. updateToSource ( source)
6870 XCTAssertTrue ( instanceUnderTest. isStale)
6971 instanceUnderTest. collectChildren ( )
7072 XCTAssertFalse ( instanceUnderTest. isStale)
71- XCTAssertEqual ( instanceUnderTest. functions. count, 4 )
73+ XCTAssertEqual ( instanceUnderTest. functions. count, 6 )
7274
7375 // None
7476 XCTAssertFalse ( instanceUnderTest. functions [ 0 ] . isThrowing)
7577 XCTAssertFalse ( instanceUnderTest. functions [ 0 ] . isAsync)
78+ XCTAssertNil ( instanceUnderTest. functions [ 0 ] . throwsIdentifier)
7679 // Throwing only
7780 XCTAssertTrue ( instanceUnderTest. functions [ 1 ] . isThrowing)
7881 XCTAssertFalse ( instanceUnderTest. functions [ 1 ] . isAsync)
82+ XCTAssertNil ( instanceUnderTest. functions [ 1 ] . throwsIdentifier)
83+ // Throwing only - specific error
84+ XCTAssertTrue ( instanceUnderTest. functions [ 2 ] . isThrowing)
85+ XCTAssertEqual ( instanceUnderTest. functions [ 2 ] . throwsIdentifier, " SpecificErrorType " )
86+ XCTAssertFalse ( instanceUnderTest. functions [ 2 ] . isAsync)
7987 // Async only
80- XCTAssertFalse ( instanceUnderTest. functions [ 2 ] . isThrowing)
81- XCTAssertTrue ( instanceUnderTest. functions [ 2 ] . isAsync)
82- // Both
83- XCTAssertTrue ( instanceUnderTest. functions [ 3 ] . isThrowing)
88+ XCTAssertFalse ( instanceUnderTest. functions [ 3 ] . isThrowing)
8489 XCTAssertTrue ( instanceUnderTest. functions [ 3 ] . isAsync)
90+ XCTAssertNil ( instanceUnderTest. functions [ 3 ] . throwsIdentifier)
91+ // Both
92+ XCTAssertTrue ( instanceUnderTest. functions [ 4 ] . isThrowing)
93+ XCTAssertTrue ( instanceUnderTest. functions [ 4 ] . isAsync)
94+ XCTAssertNil ( instanceUnderTest. functions [ 4 ] . throwsIdentifier)
95+ // Both - Specific Error
96+ XCTAssertTrue ( instanceUnderTest. functions [ 5 ] . isThrowing)
97+ XCTAssertTrue ( instanceUnderTest. functions [ 5 ] . isAsync)
98+ XCTAssertEqual ( instanceUnderTest. functions [ 5 ] . throwsIdentifier, " SpecificErrorType " )
8599 }
86100
87101 func test_function_withChildDeclarations_willResolveExpectedChildDeclarations( ) throws {
0 commit comments