...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
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 | |
---|---|
The macro |
Note | |
---|---|
The support for test suites has been added in Boost 1.70 / Unit Test Framework v3.10 |