We miss Swift equivalents for XCTAssertNoThrow and XCTAssertThrows
| Originator: | gwendal.roue | ||
| Number: | rdar://18879504 | Date Originated: | 5-11-2014 |
| Status: | Open | Resolved: | |
| Product: | Developper Tools | Product Version: | Xcode 6.1 |
| Classification: | Reproducible: | Always |
Summary: Although Swift has no support for exceptions, and sports a robust type system, there are some programming errors that are best handled with exceptions. For example : - The value of an argument is unexpectedly invalid, - A sequence of method calls is in the invalid order. If 1) those invalidities can not be checked by the type system, and 2) the likeliness of such invalid code is very low, and is not a justification for an API complexification, then we definitely need an exception. And we need to write tests for those exception absence, or presence. Please bring back XCTAssertNoThrow and XCTAssertThrows to Swift. Steps to Reproduce: Use XCTAssertNoThrow or XCTAssertThrows in a Swift test case. Expected Results: Test can run. Actual Results: Compilation error. Version: All Notes: Configuration: All Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!