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

timeout (decorator)

timeout(unsigned int seconds);

Specifies a time-out for a test-case or a test-suite, in wall-clock time.

If a test-case lasts longer than the timeout, the test is flagged as failed. On some systems (see below), the test-case is forced to stop.

For test-suites, the mechanism is similar: every test-unit under the test-suite is allocated a maximum duration time that is the remainder of the timeout after the previous tests have been executed. If a timeout occurs during the execution of the suite, the suite is flagged as timed-out and the remaining test-units are skipped.

See here for more details.

[Note] Note

The macro BOOST_SIGACTION_BASED_SIGNAL_HANDLING is defined if Boost.Test is able to force the test-case to stop.

[Note] Note

The support for test suites has been added in Boost 1.70 / Unit Test Framework v3.10


PrevUpHomeNext