Boost logo

Boost :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2007-05-16 08:57:58


Hi Jody,

Stick to your guns! Boost Test is one of the better C++ testing frameworks out there.

Anyway, what I did (in 1.33.1 - hope it still works in 1.34!) was I built a little static library with a cpp file that defined BOOST_AUTO_TEST_MAIN (or whatever it is) and #included the right file:

// file: something.cpp
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto/main.hpp> // or whatever it is

Then all my tests are linked with this little library and also the unit test library. If you are using a semi-sane build system, you should be able to attach this little library to the link line for all your tests.

Good luck,

Sohail

-----Original Message-----
From: boost-bounces_at_[hidden] on behalf of Jody Hagins
Sent: Tue 5/15/2007 7:38 AM
To: boost_at_[hidden]
Subject: Re: [boost] [Test] boost_unit_test_framework and main()
 
We now need to define BOOST_TEST_DYN_LINK in the appropriate build files

We now have to define BOOST_TEST_MAIN in all our test programs that used
to get main() by simply linking to the shared library. That's a LOT of
source files to change.

In summary, I have to change EVERY SINGLE test program in my company
that uses Boost.Test and does not use auto-test (though I probably need
to change those as well, because that feature is deprecated... though
still supported)... and EVERY SINGLE makefile that builds them.


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