Boost logo

Boost Testing :

Subject: Re: [Boost-testing] Using BoostTest to run unit tests multiple times without quitting test runner
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-05-14 20:16:20


AMDG

On 05/14/2012 04:29 PM, Pankaj wrote:
> 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:
>

This mailing list is for our own regression
tests. Try Boost.Users for questions
about the Boost.Test library.

> 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.
>

In Christ,
Steven Watanabe


Boost-testing list run by mbergal at meta-comm.com