sl@0
|
1 |
// (C) Copyright Gennadiy Rozental 2005.
|
sl@0
|
2 |
// Distributed under the Boost Software License, Version 1.0.
|
sl@0
|
3 |
// (See accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
4 |
// http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
5 |
|
sl@0
|
6 |
// See http://www.boost.org/libs/test for the library home page.
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// File : $RCSfile: test_observer.hpp,v $
|
sl@0
|
9 |
//
|
sl@0
|
10 |
// Version : $Revision: 1.3 $
|
sl@0
|
11 |
//
|
sl@0
|
12 |
// Description : defines abstract interface for test observer
|
sl@0
|
13 |
// ***************************************************************************
|
sl@0
|
14 |
|
sl@0
|
15 |
#ifndef BOOST_TEST_TEST_OBSERVER_HPP_021005GER
|
sl@0
|
16 |
#define BOOST_TEST_TEST_OBSERVER_HPP_021005GER
|
sl@0
|
17 |
|
sl@0
|
18 |
// Boost.Test
|
sl@0
|
19 |
#include <boost/test/detail/fwd_decl.hpp>
|
sl@0
|
20 |
#include <boost/test/detail/global_typedef.hpp>
|
sl@0
|
21 |
#include <boost/test/detail/config.hpp>
|
sl@0
|
22 |
|
sl@0
|
23 |
#include <boost/test/detail/suppress_warnings.hpp>
|
sl@0
|
24 |
|
sl@0
|
25 |
//____________________________________________________________________________//
|
sl@0
|
26 |
|
sl@0
|
27 |
namespace boost {
|
sl@0
|
28 |
|
sl@0
|
29 |
namespace unit_test {
|
sl@0
|
30 |
|
sl@0
|
31 |
// ************************************************************************** //
|
sl@0
|
32 |
// ************** test_observer ************** //
|
sl@0
|
33 |
// ************************************************************************** //
|
sl@0
|
34 |
|
sl@0
|
35 |
class BOOST_TEST_DECL test_observer {
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
// test observer interface
|
sl@0
|
38 |
virtual void test_start( counter_t /* test_cases_amount */ ) {}
|
sl@0
|
39 |
virtual void test_finish() {}
|
sl@0
|
40 |
virtual void test_aborted() {}
|
sl@0
|
41 |
|
sl@0
|
42 |
virtual void test_unit_start( test_unit const& ) {}
|
sl@0
|
43 |
virtual void test_unit_finish( test_unit const&, unsigned long /* elapsed */ ) {}
|
sl@0
|
44 |
virtual void test_unit_skipped( test_unit const& ) {}
|
sl@0
|
45 |
virtual void test_unit_aborted( test_unit const& ) {}
|
sl@0
|
46 |
|
sl@0
|
47 |
virtual void assertion_result( bool /* passed */ ) {}
|
sl@0
|
48 |
virtual void exception_caught( execution_exception const& ) {}
|
sl@0
|
49 |
|
sl@0
|
50 |
virtual int priority() { return 0; }
|
sl@0
|
51 |
|
sl@0
|
52 |
protected:
|
sl@0
|
53 |
BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
|
sl@0
|
54 |
};
|
sl@0
|
55 |
|
sl@0
|
56 |
} // unit_test
|
sl@0
|
57 |
|
sl@0
|
58 |
} // namespace boost
|
sl@0
|
59 |
|
sl@0
|
60 |
//____________________________________________________________________________//
|
sl@0
|
61 |
|
sl@0
|
62 |
#include <boost/test/detail/enable_warnings.hpp>
|
sl@0
|
63 |
|
sl@0
|
64 |
// ***************************************************************************
|
sl@0
|
65 |
// Revision History :
|
sl@0
|
66 |
//
|
sl@0
|
67 |
// $Log: test_observer.hpp,v $
|
sl@0
|
68 |
// Revision 1.3 2006/03/13 18:28:26 rogeeff
|
sl@0
|
69 |
// warnings eliminated
|
sl@0
|
70 |
//
|
sl@0
|
71 |
// Revision 1.2 2005/12/14 05:15:34 rogeeff
|
sl@0
|
72 |
// dll support introduced
|
sl@0
|
73 |
// priority interface added
|
sl@0
|
74 |
// provide default implementation for interface function
|
sl@0
|
75 |
//
|
sl@0
|
76 |
// Revision 1.1 2005/02/20 08:27:06 rogeeff
|
sl@0
|
77 |
// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates
|
sl@0
|
78 |
//
|
sl@0
|
79 |
// ***************************************************************************
|
sl@0
|
80 |
|
sl@0
|
81 |
#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER
|
sl@0
|
82 |
|