C++ Unit testing - the good, the bad & the ugly
summary
Argues that C++ defects like memory leaks and out‑of‑bounds errors get caught early by unit tests and shows concrete tool choices: Google Test + Google Mock (must build matching configs, needs virtual methods), Catch header-only and Sections (string test names, continue/check vs require), and alternatives (doctest, Boost.Test, CppUnit, metal, trompeloeil, FakeIt). Demonstrates mock setup patterns, Visual Studio test runners and coverage, explains header‑only deployment vs compiled libs, and insists on CI to run tests reliably.
AI-written summary · about
chapters (13)
- 0:00Introduction and speaker
- 1:21Why use C++
- 3:59The challenges of C++
- 5:05Benefits of unit testing
- 8:43Defining unit tests
- 11:53Structure of a test
- 13:29Essential testing tools
- 15:48Framework components
- 17:18Overview of C++ frameworks
- 24:46Framework examples
- 33:42Test design patterns
- 43:03Mocking frameworks
- 52:42Conclusion and Q&A
related talks
53mC++ Unit testing - the good, the bad & the ugly
01h 02mBack to Basics: C++ Testing
01h 03mBack to Basics: Testing in C++
01h 07mPragmatic Unit Testing in C++
01h 01mAdvanced Unit Testing in C & C++
01h 01mBack to Basics: Test-driven Development
01h 01mBack to Basics: Unit Testing in C++
01h 22mTest-Driven Development of C++ Embedded and System-Level Software
