Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2007-05-17 15:12:48

"Chad Maron" <cmaron_at_[hidden]> wrote in message
>I know the error has nothing to do with BOOST_PARAM_TEST_CASE, just like I
>mentioned in the sentence immediately following the error. I mention
>BOOST_PARAM_TEST_CASE because that is the where I found code to use to
>prevent the parameters from being destroyed until the test case is run. I
>also know the reason for the error, my question is what is the new
>technique for 1.34.
> "The user should make sure that parameters list will not be destroyed
> until the test case is run. That's why it not recommended to create a
> parameters list as local variable in init_unit_test_suite. A simple way to
> handle a parameters list lifetime is to place it into a user defined test
> suite class." -

I am sorry, but docs are not correct any more. In 1.34.0 it's safe to place
parameters on init function scope. The parameter's copy is stored along with
each separate test case. So you don't need a custom test suite for that
purpose. If you do insist on your own test suite, provide the name in a
parent test_suite constructor.


Boost list run by bdawes at, gregod at, cpdaniel at, john at