7. Everybody Falls, It's How You Get Back Up – Testing and Debugging
Learning Objectives
By the end of this chapter, you will be able to:
- Describe different types of assertions
- Implement compile-time and runtime assertions
- Implement exception handling
- Describe and implement unit testing and mock testing
- Debug C++ code using breakpoints and watchpoints
- Inspect data variables and C++ objects in the debugger
In this chapter, you'll learn how to add assertions appropriately, add unit test cases so that code behaves as per the requirements, and learn about debugging techniques so that you can find bugs in the code and trace the root cause of them.