650 line C++ unit test library (easy to use)
summary
Shows a tiny single-header C++ unit test library that teaches beginners by example using a string-splitting demo, finds a real bug for empty input, and demonstrates fixing it so both tests pass. Library uses an auto-generated main (define a symbol, include the header) and lets tests be written as scenarios as functions. Tests render output and organize into hierarchical test groups like operation/normal and operation/edge. Code on GitHub.
AI-written summary · about
chapters (5)
- 0:00Start
- 1:05break up a string
- 2:02using a single header file unit test library
- 3:24test this with an empty string for the input
- 4:41divide your unit tests up into a hierarchy
related talks
59mC++ Unit testing - the good, the bad & the ugly
01h 02mBack to Basics: Unit Tests
01h 01mAdvanced Unit Testing in C & C++
01h 32mFuture of Testing With C++20
58mTest Driven C++ with Catch
01h 01mBack to Basics: Unit Testing in C++
53mC++ Unit testing - the good, the bad & the ugly
01h 01m"unit"_test: Implementing a Macro-free Unit Testing Framework from Scratch in C++20
