Below you will find pages that utilize the taxonomy term “TDD”
Articles
Backwards is Forwards, my GDC lecture
Noel Llopis and I did a lecture at the Game Developer Conference this year about test driven development. It’s a process we’re using at High Moon and I use at home for all my coding. Gamasutra wrote an article about it, but they’re the ones throwing the conference so it’s not unexpected.
I didn’t realize how much work it takes to put together an hour lecture. In general is was pretty stressful, but worth doing.
Articles
Unit Testing Perl
While working on a small script at work today it occurred to me that had I been writing it in C++ I would have already had quite a few tests for the logic I had written. In a fit of madness I wrote a small test function in Perl and called it from the start of the script. After working on a couple more tests to verify some subroutines that I wasn’t sure were working properly I realized that I had more test code than script code!
Articles
Avoiding File I/O In Unit Tests
Noel’s article Test-Driven Game Development mentions that unit test suites should run quickly. That usually means as little file I/O as possible. However, sometimes you’re dealing with middleware or legacy code that requires deserialization to construct objects. What do you do?
The Problem Let’s say you have a class that can only be constructed with a stream, something like:
class Mesh { public: Mesh(InStream& stream); }; You would like to construct a Mesh in a test so you can check some functionality.