Assertion messages in XCTest

Alonso Del Arte
4 min readDec 16, 2023
Photo by Scott Van Hoy on Unsplash

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 =…

--

--

Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified