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 /// @brief defines simple text based progress monitor
10 // ***************************************************************************
12 #ifndef BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
13 #define BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
16 #include <boost/test/tree/observer.hpp>
17 #include <boost/test/utils/trivial_singleton.hpp>
20 #include <iosfwd> // for std::ostream&
22 #include <boost/test/detail/suppress_warnings.hpp>
24 //____________________________________________________________________________//
29 // ************************************************************************** //
30 // ************** progress_monitor ************** //
31 // ************************************************************************** //
33 /// This class implements test observer interface and updates test progress as test units finish or get aborted
34 class BOOST_TEST_DECL progress_monitor_t : public test_observer, public singleton<progress_monitor_t> {
36 /// @name Test observer interface
38 virtual void test_start( counter_t test_cases_amount );
39 virtual void test_aborted();
41 virtual void test_unit_finish( test_unit const&, unsigned long );
42 virtual void test_unit_skipped( test_unit const&, const_string );
44 virtual int priority() { return 3; }
47 /// @name Configuration
49 void set_stream( std::ostream& );
53 BOOST_TEST_SINGLETON_CONS( progress_monitor_t )
54 }; // progress_monitor_t
56 BOOST_TEST_SINGLETON_INST( progress_monitor )
58 } // namespace unit_test
61 //____________________________________________________________________________//
63 #include <boost/test/detail/enable_warnings.hpp>
65 #endif // BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER