1 // (C) Copyright Gennadiy Rozental 2001.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org/libs/test for the library home page.
9 /// Defines global_fixture
10 // ***************************************************************************
12 #ifndef BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
13 #define BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
16 #include <boost/test/detail/config.hpp>
17 #include <boost/test/detail/global_typedef.hpp>
19 #include <boost/test/tree/observer.hpp>
21 #include <boost/test/detail/suppress_warnings.hpp>
24 //____________________________________________________________________________//
29 // ************************************************************************** //
30 // ************** global_fixture ************** //
31 // ************************************************************************** //
33 class BOOST_TEST_DECL global_fixture : public test_observer {
39 //____________________________________________________________________________//
44 struct global_fixture_impl : public global_fixture {
46 global_fixture_impl() : m_fixture( 0 ) {}
48 // test observer interface
49 virtual void test_start( counter_t ) { m_fixture = new F; }
50 virtual void test_finish() { delete m_fixture; m_fixture = 0; }
51 virtual void test_aborted() { delete m_fixture; m_fixture = 0; }
58 } // namespace ut_detail
59 } // namespace unit_test
62 #include <boost/test/detail/enable_warnings.hpp>
64 #endif // BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER