Back to Basics: Unit Testing in C++
Talkat CppCon 2024 · on Monday, 2024-09-16· at 11:00· Maple 3/4/5, 6700 North Gaylord Rockies Boulevard·
summary
Defines unit tests as small standalone executables that live with the code, shows concrete examples: an absolute value function, catching INT_MIN overflow handling by adding a domain_error path, and using the Catch2 framework to get clear failing output instead of halting on first assertion. Argues tests are the first defense layer, contrasts black‑box behavior tests with white‑box friends for internals, cites a running suite of 36,000 combinator-generated tests as practical proof.
AI-written summary · about
chapters (10)
- 0:00Unit testing in C++ intro
- 4:15Why unit testing matters
- 13:51Writing tests with Catch2
- 21:54Testing code thoroughly
- 32:13Good unit test code
- 41:11White vs black box testing
- 48:17Designing testable software
- 52:32Test driven development
- 57:06Good process & takeaways
- 1:00:18Q&A
related talks
01h 03mBack to Basics: Testing in C++
01h 02mBack to Basics: C++ Testing
38mProperties Of Unit Tests in C++
01h 01mAdvanced Unit Testing in C & C++
55mThe Science of Unit Tests
59mC++ Unit testing - the good, the bad & the ugly
01h 01mBack to Basics: Test-driven Development
01h 07mPragmatic Unit Testing in C++
