Advanced Unit Testing in C & C++
summary
Covers concrete techniques for isolating and testing C and C++ code: running kernel-mode code in userland by undefining conflicting headers and using specific kernel compile flags, link-time mocks for globals and Singletons, and runtime mocks via C green and makito PP. Shows live examples: PCI device stubs that reproduce a crash, TCP parser and socket_stream tests that mock stream_read/receive, a link-time logger wrapper, and a mocked socket-factory sequence. Warns against pervasive preprocessor seams and recommends -nostdlib linking and pluggable framework customization.
AI-written summary · about
chapters (6)
- 0:00Introduction and motivation
- 10:31Unit testing basics refresher
- 28:30Testing kernel code in userland
- 38:42Mocking standard library functions
- 46:10Mocking Singletons and factories
- 58:06Framework customization and deployment
related talks
59mC++ Unit testing - the good, the bad & the ugly
01h 07mPragmatic Unit Testing in C++
01h 01mBack to Basics: Unit Testing in C++
01h 22mTest-Driven Development of C++ Embedded and System-Level Software
53mC++ Unit testing - the good, the bad & the ugly
46mTestability and C++ API Design
01h 01mBack to Basics: Debugging and Testing in C++ Software Development
01h 02mBack to Basics: C++ Testing
