|
Boost Users : |
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-05-03 05:17:31
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
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