Thomas Thomas

How to Write a C++ Test Framework

A long time ago I had a question about how Googletest or Catch2 implement their macros to run all the unit tests they write. While writing the implementation for CWT-Cucumber: A C++ Cucumber Interpreter, I needed the same mechanism to achieve this particular behaviour. Registering functions before main is executed. In this article I write a proof of concept for a C++ test framework.

Read More
Thomas Thomas

[C++] Typed Tests For Interfaces With Googletest

Typed tests with googletest are useful when we want to test interfaces. Typed testing avoids writing redundand tests for each implementation and guarantee that the all derived classes will run the same tests.

Read More