Boost logo

Boost Users :

Subject: [Boost-users] [Boost] [Test] [1.38] "can't use testing tools before framework is initialized"
From: Greg Christopher (gchristopher_at_[hidden])
Date: 2009-05-17 16:17:18


Hi,
    I am trying to integrate boost.test into an existing test program with its own framework. Therefore I'd like to use that program's main.

    I am currently running into this runtime error when calling BOOST_WARN_MESSAGE(1, "string"). I have tried three different things to avoid this condition:

1) I declared a TEST_SUITE using the BOOST_AUTO_TEST_SUITE() and END() macros. Probably not what I want because I want my own main to keep control, but figured it would generate a main that would allow the initialization to happen.
2) I called init_unit_test_suite( argc, argv ). Even though it was called, I am still getting this.
3) I defined a cpp_main(). This never got called. I was hoping that the existence of this symbol would cause initialization to happen elsewhere.

    My desired control flow is to have this test program in control and to use the BOOST logging tools. I am trying to slip in boost.test with a minimum of changes to this program. I have hooked its logging function to call boost logging facilities instead; just can't get past this problem.

Thanks for any help!

Greg


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