Mix Tests and Production Code With Doctest - Implementing and Using the Fastest Modern C++ Testing Framework
Explore the fastest modern C++ testing framework in this code::dive conference talk. Learn how to mix tests and production code using doctest, a lightweight single-header testing framework inspired by compiled languages like D, Rust, and Nim. Discover the framework's unique features, including anonymous variables, auto registration, and test suites. Delve into practical aspects such as silencing warnings, handling the preprocessor, and managing compile times. Gain insights on expression decomposition, exception translation, and runtime performance. Understand how to effectively use doctest in header-only libraries, compiled libraries, and multiple binaries. Follow the speaker's journey in developing this powerful testing tool and learn how to maximize its potential in your C++ projects.