No. you will have to use manual registration to specify timeout value.
Gennadiy
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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?
Yes. That was one of the main drivers to implement it.
> 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?
You might be able to do somehing relying on static variables, not macros. In
1.35.0 you should be able change the test unit properties in global fixture,
so you can add timeout postfactum.