Boost logo

Boost Users :

Subject: [Boost-users] [test framework] one testsuite over multiple translation units
From: Georg Sauthoff (g_sauthoff_at_[hidden])
Date: 2008-12-18 04:00:20


Hi,

I am using the unittest framework from boost 1.34 and it is really
usefull (starting with the BOOST_CHECK_EQ style macros are great, since they
print out the values of the arguments, etc.).

Currently I am using a set of testsuites, i.e. one testsuite consistst
of one translation unit, and each translation unit is linked to the main
from the boost test framework (utf). Thus I get n test executables for n
testsuites.

Is it possible (and/or intended) to link a set of different testsuites in
different translation together to one test executable?

I looked at different versions of utf documentation, but couldn't find
something specific about this use case.

Currently I am using utf for the single translation unit case like this:
//testsuite_foo.cc
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE foo
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE( foo_bar )
{
}

And to compile it:
$ g++ testsuite_foo.cc -lboost_unit_test_framework

How do you use the utf regarding to this aspect?

Best regards
Georg Sauthoff


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