Testing, Preconditions, Coverage and Templates in Safety-Critical C++ Code
summary
Safety‑critical C++ code requires 100% coverage with CI across many compilers, explicit preconditions that often precondition macro terminates the process and triggers a watchdog reset, and measurable performance checks (Google Benchmark plus on‑chip timing). Coverage tools (modern Clang/GCC) report line/branch and MCDC; death tests (GoogleTest assertDeath or build‑wrapper) verify termination. Template code uses equivalence classes and parameterized type tests with helpers to construct representative values, conditional instantiation and fuzzing to keep testing tractable.
AI-written summary · about
chapters (13)
- 0:00Safety-critical C++ testing intro
- 1:09What makes software safety-critical
- 2:34API specs and preconditions
- 10:27Testing preconditions
- 15:07Watchdogs in safety systems
- 20:32Automated testing importance
- 23:22100% test coverage needs
- 30:45Branch coverage and MCDC
- 39:26Equivalence classes testing
- 45:09Preconditions and death tests
- 58:20Template code testing
- 1:08:20Parameterized tests for templates
- 1:16:29Testing strategies summary
related talks
01h 01mBack to Basics: Debugging and Testing in C++ Software Development
01h 01mAdvanced Unit Testing in C & C++
01h 22mTest-Driven Development of C++ Embedded and System-Level Software
59mHardening Your Code
59mThe Most Important C++ Design Guideline is Testability
59mC++ Unit testing - the good, the bad & the ugly
01h 18mTesting C++ Templates: Investigating Tests for C++ Templates using Adversarial Methods
19mTesting Your Tests With Code Coverage
