mercredi 30 mars 2016

Xcode test coverage not covering function with block

I have a LoginViewController with a method validateLoginWithUsername. This in turn calls another method that takes 2 blocks (success and failure) as parameters.

I have two tests that mock and invoke both the success and failure blocks and the test coverage is showing 100% coverage for the validateLoginWithUsername method. However, there are functions with different block numbers with 0% coverage. This can be seen in the screen shot below :

enter image description here

I am wondering what these different block numbers mean and how I can cover these in my tests ?

Aucun commentaire:

Enregistrer un commentaire