But Can It Work for Me on My System?

“What’s all this fuss about unit testing? It doesn’t seem to be helping me much.”

You might have already tried unit testing. Perhaps you are currently struggling with writing unit tests against your legacy system. Maybe it seems like TDD is OK for those rare other souls fortunate enough to be working on a new system. But does it solve your day-to-day problems of working on a long-entrenched, challenging C++ system?

Indeed, TDD is a useful tool but is no silver bullet for dealing with legacy systems. While you can test-drive many of the new features you add to your system, you’ll also need to begin chipping away at the years of accumulated cruft. You’ll need additional strategies and tactics for a sustained ...

Get Modern C++ Programming with Test-Driven Development 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.