BOOST_AUTO_UNIT_TEST and command-line options

I have a test program that uses the BOOST_AUTO_UNIT_TEST macro (in conjunction with BOOST_AUTO_TEST_MAIN), which has been working well. However, I now need to pass some options to my test program on the command-line and the only way I can see to do this is to drop BOOST_AUTO_TEST_MAIN, add the init_unit_test_suite function and register all my tests "by hand". Is there any way to process my command-line options without losing the AUTO functionality? Thanks in advance.

"Rob Caldecott"
I have a test program that uses the BOOST_AUTO_UNIT_TEST macro (in conjunction with BOOST_AUTO_TEST_MAIN), which has been working well. However, I now need to pass some options to my test program on the command-line and the only way I can see to do this is to drop BOOST_AUTO_TEST_MAIN, add the init_unit_test_suite function and register all my tests "by hand". Is there any way to process my command-line options without losing the AUTO functionality?
Thanks in advance.
Which version of Boost.Test are you referring to? Gennadiy.

"Rob Caldecott"
I am using Boost 1.33.1.
Which version of Boost.Test are you referring to? You could access CLA through boost::unit_test::auto_unit_test_suite()
boost::unit_test::auto_unit_test_suite()->argc boost::unit_test::auto_unit_test_suite()->argv Check ifstream_line_iterator_test.cpp amoung Boost.Test unit tests for example. Gennadiy
participants (2)
-
Gennadiy Rozental
-
Rob Caldecott