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 a snapshot of the master branch, built from commit b69ad8635f.

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