
3 May
2006
3 May
'06
9:17 a.m.
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