June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Let's dive right in and look at a program we want to test. The framework we are using here is Boost.Test.
You can download Boost as a complete package from the Boost website at http://www.boost.org/users/download. For Windows and MSVC, there are precompiled libraries available. On Ubuntu, sudo apt-get install libboost-dev installs the complete library. Other distributions have a corresponding package. It is not sufficient to install only the sublibrary of the test framework as it also uses other parts of Boost.
The following listing shows a free function that you just wrote.
// https://godbolt.org/z/Ex6Mv6xczunsigned fib(unsigned n) { if(n==0) { return 0; } if(n==1) { return 1; } unsigned a = 0;
Read now
Unlock full access