Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2001-12-21 13:42:35


--- In boost_at_y..., "Fernando Cacciola" <fcacciola_at_g...> wrote:
>
[...]

> > Though the problem seems to be pretty generic and worth adding to
the
> > base implementation. I could add an ability for the user to
specify a
> > ninstance of user test case as an optional argument to
> > BOOST_TEST_CASE like this:
> >
> > BOOST_TEST_CASE(( &A::foo )); // here framework will create an
> > instance
> >
> > A* a = new A(...)
> > BOOST_TEST_CASE(( &A::foo, a )); // here framework will use the
> > instance provided and DESTROY it at the end.
> >
> > How about this?
> >
> Yes, this is exactly what I would like to have.
>
> BTW, I already add that to my copy.
>
> In order to allow A not to need a default constructor that is
probably never

[...]

No need to introduce any new classes. Just add UserTestCase* argument
to user_test_case_holder and class_test_case constructors and that is
it. Plus change a bit logic in user_test_case_holder::init(). I will
do it soon.

[...]

> But the 'closure' class might be tricky to get right, so if
>
> > BOOST_TEST_CASE(( &A::foo, a )); // here framework will use the
>
> can be parsed correctly it is probably better.

I will use closure internally. I want to provide a simplies interface
possible.

>
>
> Fernando Cacciola
> Sierra s.r.l.
> fcacciola_at_g...
> www.gosierra.com

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk