
12 Jan
2005
12 Jan
'05
1:53 p.m.
The example, unit_test_example2.cpp, demonstrates the detection of a timeout... void infinite_loop() { // unit test framework can break infinite loops by timeout #ifdef __unix // don't have timeout on other platforms BOOST_CHECKPOINT("About to enter an infinite loop!"); while(1); #else BOOST_MESSAGE( "Timeout support is not implemented on your platform" ); #endif } In my tests, I'd rather not have #ifdef __unix all over the place. Is is possible to add a macro in the Test framework itself that can be checked (on the off chance that timeout support is expanded)?