Boost logo

Boost :

Subject: Re: [boost] [test] [build] best practices for looking up data files from test executables
From: Jonathan Biggar (jon_at_[hidden])
Date: 2017-11-13 21:16:23


If it doesn't already, boost test main ought to save argc and argc for
access by tests.

On Nov 13, 2017 13:07, "Peter Dimov via Boost" <boost_at_[hidden]>
wrote:

> Stefan Seefeld wrote:
>
>> > Use the "input files" parameter of the run rule.
>> >
>> > run my_test.cpp : : my_datafile.txt ;
>> >
>> > This will pass my_datafile.txt (with the correct path) to your test >
>> executable in argv[1].
>>
>> But using boost::test I don't have direct access to argv, or do I ? I
>> don't get to write my own main() function...
>>
>
> I don't quite understand Boost.Test so I'm not sure which is the idiomatic
> way to both use automatic registration for convenience and still be able to
> access argv[1], but it ought to be possible somehow. :-)
>
> http://www.boost.org/doc/libs/1_65_1/libs/test/doc/html/boos
> t_test/tests_organization/test_suite.html
> http://www.boost.org/doc/libs/1_65_1/libs/test/doc/html/boos
> t_test/tests_organization/test_suite/master_test_suite.html
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman
> /listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk