Boost logo

Boost Users :

Subject: [Boost-users] Using BoostTest to run unit tests multiple times without quitting test runner
From: Pankaj (nathani_bits_at_[hidden])
Date: 2012-05-15 02:34:47


I want to use Boost Test to run unit tests multiple times without quitting
the test runner. Here is the pseudo-code to demonstrate what I want to do:

void main()
{
        for(int i = 0; i < 10; ++i)
        {
                char *arguments[] ={ "MyApplication.exe",
                                        "--detect_memory_leak=0"
                                };

                boost::unit_test::unit_test_main( &init_function, 2,
arguments);
        }
}

The first time unit_test_main is called, all the boost tests run fine but in
the second iteration, boost test throws an exception.

I looked at the internal code and found that framework is initialized
everytime unit_test_main is called and if framework is already initialized,
boost test doesn't like initializing framework again.

Please let me know if there is any way to run units test multiple times
without quitting test runner.

--
View this message in context: http://boost.2283326.n4.nabble.com/Using-BoostTest-to-run-unit-tests-multiple-times-without-quitting-test-runner-tp4630102.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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