Where Are We?
In this chapter, we looked conceptually at the problem of dependencies. We looked at a few ideas of how to separate the code under test from its collaborator by using test doubles. There are a variety of different kinds of test doubles and substitution techniques that are available to you in C.
In the next few chapters, we’ll put the various test doubles and substitution techniques to work as we do TDD for some modules in the middle or close to the hardware. Always choose the simplest approach that works and keeps the design clean.
Your existing legacy code may have dependency problems much worse than this. TDD helps avoid that mess by making dependency problems visible. We’ll look at how to start taming legacy code in Chapter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access