Boost logo

Boost Users :

From: Mateusz Łoskot (mateusz_at_[hidden])
Date: 2006-03-11 14:23:02


Gennadiy Rozental wrote:
> "Mateusz Loskot" <mateusz_at_[hidden]> wrote in message:
>>
>> Next, I checkouted Boost sources from CVS to have latest examples
>> on my disk. As a first test I tried to build
>> boost/libs/test/example/unit_test_example_04.cpp that mainly
>> presents usage of BOOST_AUTO_TEST_SUITE and BOOST_AUTO_TEST_CASE
>> macros.
>
>
> I don't think you could do this. Examples in cvs will only work with
> library build from cvs sources. Try examples that came with boost
> 1.33.

Hi Gennadiy,

Yes, certainly you're right.
I tested with examples from Boost 1.33 and it works well.

I noticed that the only difference between examples from 1.34 and 1.33
is header file included:

// for Boost 1.34
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>

// for Boost 1.33
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>

I also checked that the version above for Boost 1.33
works well with Boost 1.34 (tested with VC++ 8.0).
So, can I safely use older approach:

#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>

and assume that it will work well with future releases of Boost?

I'm talking about using auto tests with
BOOST_AUTO_TEST_SUITE and BOOST_AUTO_TEST_CASE macros

Best regards

-- 
Mateusz Łoskot
http://mateusz.loskot.net

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net