vendredi 30 janvier 2015

Swift - Getting around build errors in test-driven development?

I'm starting to learn how to do test-driven development, and I'm working with Swift. I'm suppose to have a test which should fail then write the code needed to get it to pass. From my understanding the test should successfully run, just fail. However, in Swift, when I try to write a test that, say, checks the value of a object's specific attribute, if that class doesn't yet have such an attribute (because I'm suppose to write the test first before I create it for that class) I don't get a failing test, but instead a build error when attempting to build and run the test. The error is that the test is trying to access an attribute that doesn't exist for the given object. Am I going about this the wrong way? Or are these test build breaking errors suppose to be what I get when doing TDD in Swift? Thanks!


Aucun commentaire:

Enregistrer un commentaire