Chapter 14
Unit Testing
Unit tests are the basis of a programming strategy that promotes the creation of individual checks for each feature implemented in an application. Unit tests can also be created to verify that a piece of code complies with some particular requirement. For example, if you are creating a method that adds two numbers, a unit test can be written to verify that the response is correct for some particular cases. Although you cannot prove that a piece of code works by just testing for specific values, running unit tests can improve your confidence that the code is indeed returning results that comply with your requirements.
Another use for unit tests and associated tools is in what is called test-driven development (TDD) ...
Get Objective-C Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.