Testing Compile-time Constructs in a Runtime Unit Testing Framework
summary
Claim: a library integrates with GoogleTest integration to compile snippets the test marks as forbidden, using a SHOULD_NOT_COMPILE macro that the tooling extracts into generated files, compiles with the same flags (via compilation database or -frecord-gcc-switches), and treats successful compilation as test failure. An external script generates per-macro files, feeds the compiler, matches static_assert messages, returns appropriate exit codes, and the proof‑of‑concept is pending but the approach works end‑to‑end.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:45Example
- 11:47Testing Pipeline
- 13:44Macros
- 18:07External Script
- 21:07Compilation Flags
- 24:42Conclusion
related talks
53mC++ Unit testing - the good, the bad & the ugly
01h 40mTesting, Preconditions, Coverage and Templates in Safety-Critical C++ Code
01h 18mMocking Framworks considered, harmful?!
01h 32mFuture of Testing With C++20
01h 29mTesting Everything in Constexpr
01h 01mAdvanced Unit Testing in C & C++
59mC++ Unit testing - the good, the bad & the ugly
51mMix Tests and Production Code With Doctest...
