Boost logo

Boost Users :

Subject: Re: [Boost-users] [utf] handling 'gold' files
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2010-06-07 08:21:11


Hi Olaf,

On Sunday, 6. June 2010 21:18:45 you wrote:
> Common (?) are test suites with automated registration. The tests know
> about the files names, but not to the paths to them due to OS specific
> paths etc. In my case the test exe is called by cmake's ctest.

Like this, I presume:

add_test(${name} ${_executable} "${directory}" )

with some platform magic on the three cmake variables.
> How to handle this? Using a global fixture with/without
> boost.program_options?

namespace utf = boost::unit_test::framework;

and then use argc and argc provided by the test framework.
For QApplication:
            QApplication(utf::master_test_suite().argc,
                                     utf::master_test_suite().argv);

Or you can parse argc and argv with program_options.

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

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