Testing Everything in Constexpr
summary
Claims that code claimed to be constexpr must be tested at compile time and shows a C++20 testing toolchain: a parser library token plus a standalone test library ketchup that avoids raw static_assert storms by deferring diagnostics to runtime, provides Google‑Test–style assert/expect variants that check both compile‑time and runtime, and uses stood::source_location plus stateful metaprogramming to preserve per‑function traceability. The library compiles and runs tests cross‑platform in practice, but remains a work in progress.
AI-written summary · about
chapters (8)
- 0:00Compile-time unit testing intro
- 1:02History of C++ compile-time
- 9:48Forms of compile-time testing
- 20:32In-source vs out-of-source
- 35:55Testing in token parser library
- 53:45Introducing ketchup library
- 1:08:17Dependent compile-time checks
- 1:19:50Future directions
related talks
01h 03mClean Test: a modern C++20 testing framework
01h 20mUnit Testing an Expression Template Library in C++20
58mHow to test static_assert?
01h 31mconsteval All The Things?
39mconstexpr everything?!
31mTesting Compile-time Constructs in a Runtime Unit Testing Framework
01h 32mFuture of Testing With C++20
58mConcept Based Testing
