|
Boost Users : |
From: Peter (pjfoley_at_[hidden])
Date: 2007-01-07 08:02:27
Hi Rob,
Thanks for that answer!
I eventually stumbled on this URL: http://tinyurl.com/ylpjtl which helped.
Following the example I then did it this way:
test->add( BOOST_TEST_CASE( boost::bind( &default_ctor_param, argv, argc )
), 0);
I will have to have a think on which way is the better way.
Do you have any views on the Pro's and Con's using BOOST_AUTO_TEST_CASE and
manually adding it using the test_suite->add method?
Thanks for the help,
Peter.
> ------------------------------
>
> Message: 7
> Date: Sun, 7 Jan 2007 11:08:54 +0000 (UTC)
> From: Rob Caldecott <robert.caldecott_at_[hidden]>
> Subject: Re: [Boost-users] [Boost.test] [BOOST_AUTO_TEST_CASE]
> accessing argc and argv
> To: boost-users_at_[hidden]
> Message-ID: <loom.20070107T120734-337_at_[hidden]>
> Content-Type: text/plain; charset=us-ascii
>
> 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.
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