Boost logo

Boost Users :

From: Ed Johnson (ed_at_[hidden])
Date: 2006-05-04 02:45:09


Johan Nilsson wrote:
> Ed Johnson wrote:
>> When using BOOST_AUTO_TEST_SUITE or BOOST_AUTO_TEST_CASE across
>> multiple files, is there a way to guarantee which Test Case or Suite
>> will execute last?
>
> In general you should never write your unit tests to depend on a specific
> order of execution, but as you're not really writing a test ...
>
>> In particular, I want the following test to always be executed last.
>>
>> BOOST_AUTO_TEST_CASE(waitForUserToPressEnter)
>> {
>> std::cout << "Press <ENTER> to continue..." << std::endl;
>> std::cin.get();
>> }
>
> I haven't tried this, but what might work is using a global fixture (i.e.
> BOOST_GLOBAL_FIXTURE) and put the above stuff in its destructor.
>
> // Johan

Thanks, Johan. Unfortunately, Gennadiy let me know that
BOOST_GLOBAL_FIXTURE isn't supported in the version of Boost that I am
using: 1.33.1


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