Test Driven Development Tests as goal posts
TDD Test Driven Development : using tests to guide coding To add a new feature: Write a test that will use the new feature Write code to pass the test
Building a Class TDD way to build a class: Come up with basic spec Write .h Make .cpp with simplest constructor and accessor functions Repeat until no more functions left Pick a function (constructors first!) Write a test Run Test Write function While test fails, repeat c-e
TDD Granularity Can use TDD at multiple levels