From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-01-12 08:53:27


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)?