Boost logo

Boost Users :

Subject: [Boost-users] [Boost.Test] [1.38] Automated test suie registration with muti-file-test-modules
From: Greg Christopher (gchristopher_at_[hidden])
Date: 2009-06-19 18:50:34


Hi,
     We are starting to expand the number of test modules and are having some growing pains.

    Originally we were using the "single header" variant included/unit_test.hpp file. Now we have switched to linking to the dynamic version of the boost test library and are including auto_unit_test.hpp.

    We have been counting on the Test Tools to automatically register suites and test cases. This still worked when we just included unit_test.hpp (instead of included/unit_test.hpp).

    However with multiple test modules, init_unit_test_suite is being defined in each module.

I am looking for clear documentation on what to do. This seems like the closest thing:

http://www.boost.org/doc/libs/1_31_0/libs/test/doc/components/unit_test_framework/components/test_case/auto_register_facility.html
However following those directions exactly when trying to use multiple test modules (in a single executable) and only one BOOST_AUTO_TEST_MAIN still results in init_unit_test_suite being multiply defined.

I would like multiple test suites, although the documentation for this declares that there is a single global test suite.

I apologize if this is well documented somewhere, but after an hour of googling I have to ask.

Greg


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