
Hello Rhys, What did you mean "BOOST_FIXTURE_TEST_SUITE per [1]"? I created test application: #define BOOST_TEST_MODULE test #include <boost/test/unit_test.hpp> #include <iostream> class Fixture { public: Fixture() { std::cout << "Long time initialization" << std::endl; } }; BOOST_FIXTURE_TEST_SUITE( default_engine, Fixture ) BOOST_AUTO_TEST_CASE( test_1 ) { } BOOST_AUTO_TEST_CASE( test_2 ) { } BOOST_AUTO_TEST_SUITE_END() Below is output: Running 2 test cases... Entering test suite "test_application" Entering test suite "default_engine" Entering test suite "inner_suite" Entering test case "test_1" Long time initialization Test case test_1 did not check any assertions Leaving test case "test_1" Entering test case "test_2" Long time initialization Test case test_2 did not check any assertions Leaving test case "test_2" Leaving test suite "inner_suite" Leaving test suite "default_engine" Leaving test suite "test_application" As you can see "Long time initialization" string appears twice. On 1 March 2010 21:49, Rhys Ulerich <rhys.ulerich@gmail.com> wrote:
I have set of test_suites. Every test_suite consists of a bunch of test_cases. Every test case should be initialized before execution.
So, I created Fixture for every test_suite. The problem is Fixture initialization takes a lot of time and boost creates it for every test_case (not for every test_suite)
Are you using BOOST_FIXTURE_TEST_SUITE per [1]? That should run once per test suite.
- Rhys
[1] http://www.boost.org/doc/libs/1_42_0/libs/test/doc/html/utf/user-guide/fixtu... _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Овдиенко Дмитрий e-mail: dmitriy.ovdienko@gmail.com skype: dmitriy.ovdienko@gmail.com mobile: +38050-1909731