Boost C++ Libraries 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 an old version of Boost. Click here to view this page for the latest version.

Function current_test_unit

boost::unit_test::framework::current_test_unit — This function provides an access to the test unit currently being executed.


// In header: <boost/test/framework.hpp>

test_unit const & current_test_unit();


The difference with current_test_case is about the time between a test-suite is being set up or torn down (fixtures) and when the test-cases of that suite start. This function is only valid during test execution phase.

See Also:

current_test_case_id, current_test_case