C++ Unit testing - the good, the bad & the ugly
summary
Compares actual tools and practices: uses a bowling-score example to show Google Test (compiled test executable, clear failure messages) versus Catch (single-header, inline assertions and sections for isolated subcases), demonstrates Google Mock’s macro-based, explicit mock classes for faking DB and REST clients, contrasts FakeIt’s automatic mocks and Isolator++’s runtime instrumentation, and calls out deployment/linker pain on Windows, documentation gaps, and when each approach succeeds or creates extra maintenance.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:52What is C
- 5:22Responsibility
- 6:18Writing unit tests
- 10:29What is unit testing
- 12:58Google Tests
- 15:29Unit Testing Framework
- 16:35Good and bad news
- 19:43Unit testing frameworks
- 23:25Google Test
- 31:25mocking framework
- 32:51mocking frameworks
- 34:40mocking in C
- 36:36mocking in Google Mach
- 44:59multiple assert dilemma
- 47:23test fixtures
- 49:44how to choose
related talks
59mC++ 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 01m“Mocking Frameworks considered harmful”
58mTest Driven C++ with Catch
01h 04m“All Your Tests are Terrible..."
