Summary
Maintaining high-quality software is a huge and complex task, and today, there is such a multitude of tools and techniques to test software that it can be hard to up. With the techniques and tools described in this chapter, we hope to have given a brief overview of the most common tasks and tools used in modern C++ development. CTest and CMake can help orchestrate the various kinds of tests to get the most out of the tools. In this chapter, you’ve seen how tests can be defined and run, how to execute them in parallel, and how to manage test resources. We’ve explored how to define test fixtures and how to define advanced ways to determine whether a test succeeded or failed, based on its output.
We illustrated how to set up code coverage reports using Gcov and how to define custom build types to pass the necessary compiler flags. We looked at how various tools for static code analysis can be included in CMake projects and how the sanitizers of various compilers...