source: NonGTP/Boost/boost/test/framework.hpp @ 857

Revision 857, 3.3 KB checked in by igarcia, 19 years ago (diff)
Line 
1//  (C) Copyright Gennadiy Rozental 2005.
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        : $RCSfile: framework.hpp,v $
9//
10//  Version     : $Revision: 1.3 $
11//
12//  Description : defines framework singletom object
13// ***************************************************************************
14
15#ifndef BOOST_TEST_FRAMEWORK_HPP_020805GER
16#define BOOST_TEST_FRAMEWORK_HPP_020805GER
17
18// Boost.Test
19#include <boost/test/detail/global_typedef.hpp>
20#include <boost/test/detail/fwd_decl.hpp>
21#include <boost/test/utils/trivial_singleton.hpp>
22
23#include <boost/test/detail/suppress_warnings.hpp>
24
25//____________________________________________________________________________//
26
27namespace boost {
28
29namespace unit_test {
30
31// ************************************************************************** //
32// **************                   framework                  ************** //
33// ************************************************************************** //
34
35namespace framework {
36
37// initialization
38void                init( int argc, char* argv[] );
39
40// mutation access methods
41void                register_test_unit( test_case* tc );
42void                register_test_unit( test_suite* ts );
43
44void                register_observer( test_observer& );
45void                reset_observers();
46
47// constant access methods
48test_suite const&   master_test_suite();
49test_case const&    current_test_case();
50#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530) )
51template<typename UnitType>
52UnitType const&     get( test_unit_id id )
53{
54    return static_cast<UnitType const&>( get( id, (test_unit_type)UnitType::type ) );
55}
56test_unit const&    get( test_unit_id, test_unit_type );
57#else
58test_unit const&    get( test_unit_id, test_unit_type );
59template<typename UnitType>
60UnitType const&     get( test_unit_id id )
61{
62    return static_cast<UnitType const&>( get( id, (test_unit_type)UnitType::type ) );
63}
64#endif
65
66// test initiation
67void                run( test_unit_id = INV_TEST_UNIT_ID, bool continue_test = true );
68void                run( test_unit const*, bool continue_test = true );
69
70// public test events dispatchers
71void                assertion_result( bool passed );
72void                exception_caught( execution_exception const& );
73void                test_unit_aborted();
74
75} // namespace framework
76
77} // unit_test
78
79} // namespace boost
80
81//____________________________________________________________________________//
82
83#include <boost/test/detail/enable_warnings.hpp>
84
85// ***************************************************************************
86//  Revision History :
87// 
88//  $Log: framework.hpp,v $
89//  Revision 1.3  2005/03/24 04:02:32  rogeeff
90//  portability fixes
91//
92//  Revision 1.2  2005/03/23 21:02:10  rogeeff
93//  Sunpro CC 5.3 fixes
94//
95//  Revision 1.1  2005/02/20 08:27:05  rogeeff
96//  This a major update for Boost.Test framework. See release docs for complete list of fixes/updates
97//
98// ***************************************************************************
99
100#endif // BOOST_TEST_FRAMEWORK_HPP_020805GER
101
Note: See TracBrowser for help on using the repository browser.