



























Back in the late 1990s and early 2000s, JUnit and CppUnit were gaining popularity, but I wanted something my beginning C++ students could understand immediately.
This article explores how little code is actually required to build a useful unit-testing framework: expression stringizing, source-location reporting, exception testing, and a simple test driver in a single header file.
The implementation predates C++17, which leads to some interesting discussion about anonymous namespaces, inline variables, and how I would approach the design today.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。