-
Book Overview & Buying
-
Table Of Contents
Software Architecture with C++ - Second Edition
By :
As for the frameworks, the current de facto standard is GoogleTest (GTest). Together with its companion Google Mock (gMock), it forms a small suite of tools that allows you to follow the best practices of testing in C++.
Other popular alternatives to the GTest/gMock duo are Catch2, Boost.Test, Doctest, CppUTest, and [Boost].UT. All these frameworks support the modern C++ standards—in particular, C++14, C++17, C++20, and C++23.
To compare these testing frameworks, we will use the same code base that we want to test. Using it as a basis, we will then implement tests in each of the frameworks. There is no universal recipe, as the framework choice depends on your projects and needs.
Some testing frameworks, such as DrogonTest and Qt Test, are provided with libraries, which may be suitable in cases where you need to test systems based on these libraries and using their specific features.
GTest is an xUnit test framework...