[Boost.test] [BOOST_AUTO_TEST_CASE] accessing argc and argv

Hi, I am trying to learn to use the Boost.Test framework and have read through the online documents explaining how to use Boost.Test. I have been unable to find how to access the argc and argv variables while using BOOST_AUTO_TEST_CASE with "BOOST_AUTO_TEST_MAIN" defined. So my question is using "The automatic registration facility" (http://tinyurl.com/y2en48) is it possible to access argc and argv? If not does that mean I have to define a "boost::unit_test::test_suite* init_unit_test_suite ( int argc, char* argv[] )" and use these variables? Thanks, Peter.

Peter <pjfoley <at> bigpond.com> writes:
is it possible to access argc and argv?
I had the same problem. You can use boost::unit_test::auto_unit_test_suite()->argc and boost::unit_test::auto_unit_test_suite()->argv. Regards.

"Rob Caldecott" <robert.caldecott@gmail.com> wrote in message news:loom.20070107T120734-337@post.gmane.org...
Peter <pjfoley <at> bigpond.com> writes:
is it possible to access argc and argv?
I had the same problem. You can use boost::unit_test::auto_unit_test_suite()->argc and boost::unit_test::auto_unit_test_suite()->argv.
Correct interface in 1.34.0 is: boost::unit_test::master_test_suite()->argc and boost::unit_test::master_test_suite()->argv. In a future this interface may be revisited though. See Boost.Test examples also. Genandiy
participants (3)
-
Gennadiy Rozental
-
Peter
-
Rob Caldecott