![Hands-On Server-Side Web Development with Swift](https://wfqqreader-1252317822.image.myqcloud.com/cover/154/36699154/b_36699154.jpg)
上QQ阅读APP看书,第一时间看更新
Learning useful assertion macros
Swift test assertions are useful in checking expected results in test methods. There is a family of macros similar to XCTAssert() to help evaluate any given conditions. Each macro optionally allows a literal NSString to describe what happens when there is a failure. For XCTAssert(), a failure is when the Boolean expression == false:
![](https://epubservercos.yuewen.com/A4AEFC/19470384808841706/epubprivate/OEBPS/Images/005.jpg?sign=1739911532-Okv6CpXDxexn73MmzdDwQH3GisavAHiA-0-858148ac065297b025fa0d62dcc4f060)