Boost.Test > FAQ
Boost Test logo

Frequently Asked Questions

Where the latest version of the Boost Test Library is located?

The latest version of Boost Test Library is available online on www.boost.org.

I found a bug. Where could I report it?

Send a bug report to Gennadiy Rozental.

I have a request for a new feature. Where could I ask for it?

You can send a request to Gennadiy Rozental.

How to create test case?

To create a test case use the macro BOOST_AUTO_TEST_CASE( test_function ). For more details see the Unit Test Framework documentation.

How to create test suite?

To create a test suite use the macro BOOST_AUTO_TEST_SUITE( suite_name ). For more details see the Unit Test Framework documentation.

Why did I get a linker error when compiling my test program?

Boost Test Library is intended to be used off-line. To create a test program you should link with the one of the precompiled library components or use "included" version of the component located in a boost/test/included directory. For example, to use Unit Test Framework you may either include the <boost/test/unit_test.hpp> and link with libunit_test_framework.lib or you could include <boost/test/included/unit_test.hpp> in which case you would not need to link with any precompiled component. Note also that you should strictly follow specification on integration function in other case some compilers may produce linker error like this:

Unresolved external init_unit_test_suite(int, char**).

The reasons for this error is that in your implementation you should specify second argument of init_unit_test_suite exactly as in a specification, i.e.: char* [].

How could I redirect testing output?

Use unit_test_log::instance().set_log_output( std::ostream& ). For more details see the Unit Test Framework documentation.

I want different default log trace level

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 Unit Test Framework documentation.

Is there DLL version of Boost.Test components available on Win32 platform?

No. At the moment Boost Test components could not be compiled into dlls to be loaded at runtime.