Time for action - writing and debugging code
The basic procedure (as we've discussed before), is to write some code and run the tests to find problems with the code, and repeat. When you come across an error that isn't covered by an existing test, you write a new test and continue the process.
- Write code that ought to satisfy at least some of your tests
- Run your tests. If you used it when we talked about it in previous chapters, you should be able to run everything simply by executing:
- If there are errors in the code you've already written, use the test output to help you locate and identity them. Once you understand the bugs, try to fix them and then go back to step 2.
- Once you've fixed all the errors in the code you've written, and ...