]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/test/include/boost/test/tree/global_fixture.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / test / include / boost / test / tree / global_fixture.hpp
CommitLineData
7c673cae
FG
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)
5
6// See http://www.boost.org/libs/test for the library home page.
7//
8/// @file
9/// Defines global_fixture
10// ***************************************************************************
11
12#ifndef BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
13#define BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
14
15// Boost.Test
16#include <boost/test/detail/config.hpp>
17#include <boost/test/detail/global_typedef.hpp>
18
19#include <boost/test/tree/observer.hpp>
20
21#include <boost/test/detail/suppress_warnings.hpp>
22
23
24//____________________________________________________________________________//
25
26namespace boost {
27namespace unit_test {
28
29// ************************************************************************** //
30// ************** global_fixture ************** //
31// ************************************************************************** //
32
33class BOOST_TEST_DECL global_fixture : public test_observer {
34public:
35 // Constructor
36 global_fixture();
37};
38
39//____________________________________________________________________________//
40
41namespace ut_detail {
42
43template<typename F>
44struct global_fixture_impl : public global_fixture {
45 // Constructor
46 global_fixture_impl() : m_fixture( 0 ) {}
47
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; }
52
53private:
54 // Data members
55 F* m_fixture;
56};
57
58} // namespace ut_detail
59} // namespace unit_test
60} // namespace boost
61
62#include <boost/test/detail/enable_warnings.hpp>
63
64#endif // BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
65