Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12953: access to master_test_suite().{argc, argv}
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-06-27 07:17:48
#12953: access to master_test_suite().{argc, argv}
-------------------------------+-----------------------------
Reporter: ope-devel@⦠| Owner: Raffi Enficiaud
Type: Feature Requests | Status: assigned
Milestone: Boost 1.66.0 | Component: test
Version: Boost 1.63.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-----------------------------
Comment (by Raffi Enficiaud):
Hi Olaf,
So yes, once the test starts (in `BOOST_DATA_TEST_CASE`) you have access
to the `argv` as usual. The only issue you were facing is that `argv`
should be used in your setup to create the tests and it was not supported.
If you need to pass an additional parameter to the test for the reporting
you have, I would rather suggest to access it through the
`master_test_suite_t` `argv`. The other option would be to change the
iterator of the dataset to return this parameter. In the example I posted,
there is a third parameter that is given to the test.
You can get the current test case name directly from the framework. See
[https://stackoverflow.com/a/13027251/1617295 here] for instance.
For the error raised by passing `--list_content`, this is just a problem
in handling the datasets, not a boost.test issue (I got it running for the
example I gave you by disabling all the other tests from the file `test
/test-organization-ts/dataset-master-test-suite-accessible-test.cpp` in
this branch).
Best,
Raffi
-- Ticket URL: <https://svn.boost.org/trac10/ticket/12953#comment:13> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2018-06-27 07:23:11 UTC