Boost logo

Boost Users :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-03-11 17:20:20


Stephen Torri <torrisa <at> auburn.edu> writes:

>
>
> On Tue, 2008-03-11 at 19:09 +0000, Gennadiy Rozental wrote:
> > #define BOOST_TEST_DYN_LINK
> > #define BOOST_TEST_MODULE GRNN test suite
> >
> > BOOST_AUTO_TEST_CASE( test_distance_squared )
> > {
> > ....
> > }
> >
> > and it will work with shared lib. Remove define BOOST_TEST_DYN_LINK and it
> > will work with static lib as well.
> >
> > Gennadiy
>
> What I want to know is how I can create a layered test suite like is
> eluded to by the documentation? The documentation does not provide any
> examples of a test suite within a test suite.

It's covered in docs. You can use BOOST_AUTO_TEST_SUITE. There is an example
of coplex hierarhy there as well. In general it's as simple as:

BOOST_AUTO_TEST_SUITE(s1)

BOOST_AUTO_TEST_CASE(test1)
{
}

BOOST_AUTO_TEST_SUITE(internal_suite)

BOOST_AUTO_TEST_CASE(test1)
{
}

BOOST_AUTO_TEST_SUITE_END()

BOOST_AUTO_TEST_SUITE_END()

BOOST_AUTO_TEST_SUITE(s2)

BOOST_AUTO_TEST_CASE(test1)
{
}

BOOST_AUTO_TEST_SUITE_END()

Gennadiy


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