Boost logo

Boost :

Subject: Re: [boost] Tests failing?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2013-02-08 12:47:26


Marshall Clow <mclow.lists <at> gmail.com> writes:

> > 1. Replace
> >
> > #include <boost/test/test_exec_monitor.hpp>
> >
> > with
> >
> > #define BOOST_TEST_MAIN
> > #include <boost/test/test_exec_monitor.hpp>
>
> Are you sure?

Oops. Sorry. Typo. It should be
#include <boost/test/unit_test.hpp>

> I tried that, and it didn't work at all.
>
> I looked at the documentation, and it showed:
>
> #define BOOST_TEST_MODULE MyTest
> #define BOOST_TEST_MAIN
> #include <boost/test/unit_test.hpp>
>
> Is that correct?

You do not need both BOOST_TEST_MAIN and BOOST_TEST_MODULE. Keep later , since
it allows to name your test module's master test suite, but using just
BOOST_TEST_MAIN allows to build and run as well.

Gennadiy


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