
That's too bad, I like the automatic registration facility because it is less error-prone ... It doesn't allow you to write test cases and not notice that they never get called.
How hard would it be for me to fake it? I wonder if there's some preprocessor trickery that could keep a list, e.g.
#define MY_TEST_CASE( function_name ) \
#define TEMP LISTOFTESTS, function_name \
#undef LISTOFTESTS \
#define LISTOFTESTS TEMP \
#undef TEMP \
BOOST_CLASS_TEST_CASE(function_name())
Well I know that obviously won't work but you get the idea ... To wind up with a list that looks like:
function1, function2, function3,
Which I can then use in an initialized array, and have my test_suite automatically add all of them.
Possible? Good approach or bad?
-----Original Message-----
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental
Sent: Thursday, April 17, 2008 1:26 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] boost::test timeouts and auto test suites
Christopher E Piggott
Within a BOOST_FIXTURE_TEST_CASE can i set a timeout for individual tests? I'm using 1.31.1 and I am aware that a test_unit has a property "p_timeout." I just don't know how to get to it. I'm using BOOST_AUTO_TEST_MAIN, BOOST_AUTO_TEST_SUITE, and a series of BOOST_FIXTURE_TEST_CASE objects. Maybe that's just too much auto :)
No. you will have to use manual registration to specify timeout value. Gennadiy _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users