Back to Basics: Testing in C++
Talkat CppCon 2023 · on Thursday, 2023-10-05· at 09:00· Cottonwood 2/3, 6700 North Gaylord Rockies Boulevard·
summary
Focuses on concrete testing choices: unit tests sit at the bottom of the testing pyramid and must be fast, deterministic and isolated; Michael Fe’s rules (no DB, network, files) guide what is or isn’t a unit test. Demonstrates Catch2 and Google Test side‑by‑side (REQUIRE vs ASSERT_EQ, sections vs fixtures), builds left‑pad and MRU examples, shows a failing run that prints expression plus file/line. Notes 84 C++ frameworks on Wikipedia, Google Test is top, Catch2 second, 34% wrote no tests in 2020, and practices a Red‑Green‑Refactor TDD cycle.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:27What is a test?
- 12:21Use a test framework?
- 18:02C++ test frameworks
- 23:37Unit tests with examples
- 31:01Unit testing best practices
- 40:10Stateful code testing
- 46:10Testing challenges
- 51:06Next steps and TDD
- 55:39SOLID design principles
- 57:48Resources and closing
- 1:00:16Q&A
related talks
01h 02mBack to Basics: C++ Testing
01h 01mBack to Basics: Unit Testing in C++
59mC++ Unit testing - the good, the bad & the ugly
01h 01mBack to Basics: Test-driven Development
01h 01mBack to Basics: Debugging and Testing in C++ Software Development
53mC++ Unit testing - the good, the bad & the ugly
01h 07mPragmatic Unit Testing in C++
01h 02mBack to Basics: Unit Tests
