Thanks Aaina for pointing the stuff. Yes, we should not have an assertion in the else block for the following reasons:

So it should be a failed test rather than any other assertions. I have updated the code. :)

--

--

--

Software Developer(iOS), Speaker & Writer at Swift India

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
G. Abhisek

G. Abhisek

Software Developer(iOS), Speaker & Writer at Swift India

More from Medium

Data-Driven Decision Making in Public Policy

A Snake In The Tree

A Western Green Mamba looking carefully at you!

Conversations from last night

Words of advice from someone who lost their partner to ROCD.