The TDD Process in Depth

We’re going to add a lot of code to the logging library in this chapter, and while that’s good, it’s not the main purpose of the chapter.

This is a chapter about the test-driven development (TDD) process. Wasn’t Chapter 3 also about the TDD process? Yes, but think of the earlier chapter as an introduction. This chapter will explore the TDD process in detail with a lot more code.

You’ll get ideas for writing your own tests, how to figure out what’s important, and how to refactor code without rewriting tests too, and you’ll also learn when testing is too much and learn about many different types of tests.

The basic TDD process remains as follows:

  • To write tests first that use the software in a natural and intuitive ...

Get Test-Driven Development with 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.