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

Revision 857, 3.5 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]1//  (C) Copyright Gennadiy Rozental 2001-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: results_reporter.hpp,v $
9//
10//  Version     : $Revision: 1.1 $
11//
12//  Description : defines class unit_test_result that is responsible for
13//  gathering test results and presenting this information to end-user
14// ***************************************************************************
15
16#ifndef BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
17#define BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
18
19// Boost.Test
20#include <boost/test/detail/global_typedef.hpp>
21#include <boost/test/detail/fwd_decl.hpp>
22
23// STL
24#include <iosfwd>   // for std::ostream&
25
26#include <boost/test/detail/suppress_warnings.hpp>
27
28//____________________________________________________________________________//
29
30namespace boost {
31
32namespace unit_test {
33
34namespace results_reporter {
35
36// ************************************************************************** //
37// **************              formatter interface             ************** //
38// ************************************************************************** //
39
40class format {
41public:
42    // Destructor
43    virtual ~format() {}
44
45    virtual void    results_report_start( std::ostream& ostr ) = 0;
46    virtual void    results_report_finish( std::ostream& ostr ) = 0;
47
48    virtual void    test_unit_report_start( test_unit const&, std::ostream& ostr ) = 0;
49    virtual void    test_unit_report_finish( test_unit const&, std::ostream& ostr ) = 0;
50
51    virtual void    do_confirmation_report( test_unit const&, std::ostream& ostr ) = 0;
52};
53
54// ************************************************************************** //
55// **************              report configuration            ************** //
56// ************************************************************************** //
57
58void set_level( report_level );
59void set_stream( std::ostream& );
60void set_format( output_format );
61void set_format( results_reporter::format* );
62
63// ************************************************************************** //
64// **************               report initiation              ************** //
65// ************************************************************************** //
66
67void        make_report( report_level l = INV_REPORT_LEVEL, test_unit_id = INV_TEST_UNIT_ID );
68inline void confirmation_report( test_unit_id id = INV_TEST_UNIT_ID )   { make_report( CONFIRMATION_REPORT, id ); }
69inline void short_report( test_unit_id id = INV_TEST_UNIT_ID )          { make_report( SHORT_REPORT, id ); }
70inline void detailed_report( test_unit_id id = INV_TEST_UNIT_ID )       { make_report( DETAILED_REPORT, id ); }
71
72} // namespace results_reporter
73
74} // namespace unit_test
75
76} // namespace boost
77
78//____________________________________________________________________________//
79
80#include <boost/test/detail/enable_warnings.hpp>
81
82// ***************************************************************************
83//  Revision History :
84// 
85//  $Log: results_reporter.hpp,v $
86//  Revision 1.1  2005/02/20 08:27:06  rogeeff
87//  This a major update for Boost.Test framework. See release docs for complete list of fixes/updates
88//
89// ***************************************************************************
90
91#endif // BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
92
Note: See TracBrowser for help on using the repository browser.