Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 5789d098be.
PrevUpHomeNext

BOOST_TEST

BOOST_TEST(statement);
BOOST_TEST_<level>(statement);

// replacement failure message, requires variadic macros
BOOST_TEST(statement, "failure message");

// Floating point comparison, requires variadic macros, auto and decltype
BOOST_TEST(statement, floating_point_comparison_manipulation);

// bitwise comparison, requires variadic macros, auto and decltype
BOOST_TEST(statement, boost::test_tools::bitwise() );

// element-wise comparison, for containers
BOOST_TEST(statement, boost::test_tools::per_element() );

// lexicographic comparison, for containers
BOOST_TEST(statement, boost::test_tools::lexicographic() );

The full documentation of this macro is located here.

The macro is available in three variants, corresponding to different assertion severity levels:

BOOST_TEST // or BOOST_TEST_CHECK
BOOST_TEST_REQUIRE
BOOST_TEST_WARN

Limitations and workaround

There are some restrictions on the statements that are supported by this tool. Those are explained in details in this section.


PrevUpHomeNext