![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=1739284378-vumwXk8RJxRJjq8Hs4Mx894cqSgKhPaj-0-d58bbc5555e1cc5207287700bb6d0c23)