In this chapter, you've learned how to write unit tests, how to write data-driven tests, and how to use data-driven tests combined with TDD to design pure functions.
TDD is one of the core practices of effective software development. While it may seem weird and counterintuitive at times, it has a strong advantage—every few minutes, you have something working that you can demo. A passing test is not only a demo point, but also a save point. If anything wrong happens while trying to refactor or to implement the following test, you can always go back to the last save point. I find this practice even more valuable in C++, where so many things can go wrong. In fact, I wrote all the code since Chapter 3, Deep Dive into Lambdas, with a TDD approach. This has been immensely helpful, since I know that my code is working—something that is quite difficult to do...