Boost logo

Boost :

From: Jens Seidel (jensseidel_at_[hidden])
Date: 2008-01-17 09:43:52


On Tue, Jan 15, 2008 at 04:58:07PM +0100, Jens Seidel wrote:
> On Fri, Dec 21, 2007 at 03:11:09PM +0100, Jens Seidel wrote:
> > int main(int argc, char *argv[])
> > {
> > return ::boost::unit_test::unit_test_main(&init_unit_test, argc, argv);
> > }
> >
> > works. Please note that one has to read dozens of pages before as this
> > is nearly at the end of the documentation.
>
> But it does not work with Boost 1.33.1 in contrast to 1.34.1 as
> master_test_suite() returns a const reference.

Oops, I forgot to mention that it even in 1.34.1 crashs if I provide 0
as init function pointer. This forced me during my tests to also define
a dummy function just to make unit_test_main() happy.

I suggest to overload a new function which doesn't take a init function
at all but 0 should also be a valid pointer.
 
> I switched now to inclusion of boost/test/included/unit_test_framework.hpp
> instead of using libraries. Let's see whether it will break soon as well ...

It still works :-))

Jens


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