Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-02-05 13:04:43


 

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Gennadiy Rozental
| Sent: 03 February 2006 16:23
| To: boost_at_[hidden]
| Subject: Re: [boost] [Test] Link succeeds without
| BOOST_TEST_MAIN defined
|
| > The following unexpectedly(?) links and run:
| > ---
| > #include <boost/test/auto_unit_test.hpp>
| >
| > boost::unit_test::test_suite*
| > init_unit_test_suite( int, char*[] )
| > {
| > boost::unit_test::framework::master_test_suite().p_name.value =
| > "whatever";
| > return 0;
| > }
| > ---
| >
| > Don't I need to define BOOST_TEST_MAIN in this case? Is
| this as intended?
| > I'm using the latest cvs and UTF as a static library.
|
| The only purpose of BOOST_TEST_MAIN for regular build is to
| define this init
| function. So obviously this is working.

so is the effect of BOOST_TEST_MAIN to define, with the name "Master Test
suite"

| > boost::unit_test::test_suite*
| > init_unit_test_suite( int, char*[] )
| > {
| > boost::unit_test::framework::master_test_suite().p_name.value =
| > "Master test suite";
| > return 0;
| > }

If so, it might be worth saying just this.

But if I write

#define BOOST_TEST_MAIN "My Test suite"

I might naively expect it to be be logged as

Test suite "My Test Suite" failed with: .....

But this doesn't seem to happen. Perhaps it easily could?

Paul

PS not able to FTP suck code from your machine today. Maybe it has a rest
on Sunday? ;-)

-- 
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204
mailto: pbristow_at_[hidden]  http://www.hetp.u-net.com/index.html
http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html

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