![]() |
Home | Libraries | People | FAQ | More |
The latest version of Boost Test Library is available online at http://www.boost.org/libs/test.
You can send a bug report to the boost users' mailing list and/or directly to Gennadiy Rozental.
You can send a request to the boost developers' mailing list and/or directly to Gennadiy Rozental.
To create a test case, use the macro
BOOST_AUTO_TEST_CASE( test_function );
For more details see the Unit Test Framework BOOST_AUTO_TEST_CASE documentation.
To create a test suite use the macro
BOOST_AUTO_TEST_SUITE( suite_name );
For more details see the Unit Test Framework BOOST_AUTO_TEST_SUITE documentation.
Boost Test Library components provide several usage variants: to create a test program you can link with the one of the precompiled library variants or use single-header variant. For example, to use Unit Test Framework you may either include
#include <boost/test/unit_test.hpp>
and link with
libunit_test_framework.lib
or you can include
#include <boost/test/included/unit_test.hpp>
in which case you should not need to link with any precompiled component. Note also that you should strictly follow specification on initialization function in other case some compilers may produce linker error like this.
Unresolved external init_unit_test_suite(int, char**).
The reason for this error is that in your implementation you should specify
second argument of init_unit_test_suite
exactly as in the specification, i.e.: char* [].
Use
unit_test_log::instance().set_log_output( std::ostream & )
For more details see the UTF output streams testing tools documentation.
Use environment variable BOOST_TEST_LOG_LEVEL to define desired
log trace level. You still will be able to reset this value from the command
line. For the list of acceptable values see the UTF runtime configuration documentation.
Yes. Starting with Boost 1.34.0.