Where Are We?

In this chapter, we created a seemingly target-dependent module by breaking the dependencies on the hardware and OS using link-time test doubles. We employed a spy and a fake. The tests are valid, and we made progress without hardware.

We started by composing a test list. This helps organize our thoughts. We don’t expect to make a perfect test list. Start with whatever tests you can think of, and evolve the test list as you learn more.

We thought about how to implement the scheduler but did not implement it all at once. We let the tests drive us, but we did have a design goal in mind.

When there is collection behavior, use the 0-1-N TDD pattern. The 0 and 1 cases are usually easy to define and help clarify thoughts on interfaces, ...

Get Test Driven Development for Embedded C 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.