
terminate called after throwing an instance of 'std::runtime_error' what(): can't use testing tools before framework is initialized
I am assuming this means I need to wait with the construction of my factory class until Boost.Test is ready, but I am unsure how to do this.
I ended up working around this by creating a wrapper function. This function calls init() once (if it has not already been called) followed by the intended test. I wrap all my test functions in this wrapper, this way it does not matter which test is called first, the init code will always run first. I think there is probably room in Boost.Test for some way of running code during init (which uses BOOST_REQUIRE_* etc) for those situations where factory classes must be created prior to the tests which use them, and when the tests are manually registered. Cheers, Adam.