There’s an often-repeated myth that C++ is not well-suited to doing TDD. This is completely untrue. With a single, simple technique, based on C++ templates, **any** dependency in C++ can be mocked up with very little effort, a technique I call **"Test Base Class Injection"**. It works on automatic variables, parameters, return types, and “C” APIs. The same technique can be applied to legacy code, and even in kernel-mode or straight C.