Assertion messages in XCTest
4 min readDec 16, 2023
You can get a lot of testing work done for your Swift programming in Xcode just with XCTest’s Assert Equals. With Assert Equals, you can count on Xcode to report what was expected and was actually received. For example, in a blackjack or poker program, if this test fails,
func testShorthand() {
for suit in Suit.allCases {
for rank in Rank.allCases {
let card: PlayingCard =…