Just a quick comment. The problem with this library is that it has at least three different ways to implement and run tests. Depending on what #definesyou add to your code, before you include the boost unit test header, it can automatically generate the main function for you (and then create a complete program that runs the tests you defined), or rely on external test ones runners.
Read these operating modes carefully to know what to do. Usually the easiest way is to do this:
- Include the tests in the .cpp file.
- Before including the unit test header file, define a preprocessor macro
BOOST_TEST_MAIN(this will determine the main function that will run the tests). - DLL libboost-unit-test ( ).
, .