[boost.test] Test suits and autoregistration
Hi, I'm using boost 1.33.1, but the question applies to 1.34 too. Is it possible to create tests suites that contain test cases from different translation units using only auto registration? Ex: in file1.cpp BOOST_AUTO_TEST_SUITE(BigSuite); auto-register test suites and cases here... BOOST_AUTO_TEST_SUITE_END(); in file2.cpp BOOST_AUTO_TEST_SUITE(BigSuite); auto-register other test suites and cases here... BOOST_AUTO_TEST_SUITE_END(); As result only one suite with name "BigSuite" should be registered. Best regards, Stefan
"Stefan Shishkov"
Hi,
I'm using boost 1.33.1, but the question applies to 1.34 too. Is it possible to create tests suites that contain test cases from different translation units using only auto registration? Ex:
in file1.cpp
BOOST_AUTO_TEST_SUITE(BigSuite);
auto-register test suites and cases here...
BOOST_AUTO_TEST_SUITE_END();
in file2.cpp
BOOST_AUTO_TEST_SUITE(BigSuite);
auto-register other test suites and cases here...
BOOST_AUTO_TEST_SUITE_END();
As result only one suite with name "BigSuite" should be registered.
This is very reasonable. I've made the changes in my local copy to support this. Unfortunately It won't make into cvs until I am done with docs update in boostbook format. Thanks, Gennadiy
Gennadiy Rozental ??????:
"Stefan Shishkov"
wrote in message news:newscache$lbodlj$kgn$1@news.obs.bg... Hi,
I'm using boost 1.33.1, but the question applies to 1.34 too. Is it possible to create tests suites that contain test cases from different translation units using only auto registration? Ex:
in file1.cpp
BOOST_AUTO_TEST_SUITE(BigSuite);
auto-register test suites and cases here...
BOOST_AUTO_TEST_SUITE_END();
in file2.cpp
BOOST_AUTO_TEST_SUITE(BigSuite);
auto-register other test suites and cases here...
BOOST_AUTO_TEST_SUITE_END();
As result only one suite with name "BigSuite" should be registered.
This is very reasonable. I've made the changes in my local copy to support this. Unfortunately It won't make into cvs until I am done with docs update in boostbook format.
Thanks, combined with the possibility to run tests suits by name this will simplify our test projects. Our goal is to make some "high level" test suits like smoke_tests, slow_tests, integration_tests, and to run only some of them using command line parameters. Currently we are doing this with manual registration. As experiment, we also made some changes in 1.33.1 to achieve this with auto-registration. Unfortunately the changes do not work with 1.34, so we will wait until you publish this feature. Best regards, Stefan
Thanks,
Gennadiy
participants (2)
-
Gennadiy Rozental
-
Stefan Shishkov