Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:09:21

0001 //  (C) Copyright Gennadiy Rozental 2001.
0002 //  Distributed under the Boost Software License, Version 1.0.
0003 //  (See accompanying file LICENSE_1_0.txt or copy at
0004 //  http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 //  See http://www.boost.org/libs/test for the library home page.
0007 //
0008 /// @file
0009 /// @brief defines simple text based progress monitor
0010 // ***************************************************************************
0011 
0012 #ifndef BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
0013 #define BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
0014 
0015 // Boost.Test
0016 #include <boost/test/tree/observer.hpp>
0017 
0018 // STL
0019 #include <iosfwd>   // for std::ostream&
0020 
0021 #include <boost/test/detail/suppress_warnings.hpp>
0022 
0023 //____________________________________________________________________________//
0024 
0025 namespace boost {
0026 namespace unit_test {
0027 
0028 // ************************************************************************** //
0029 // **************                progress_monitor              ************** //
0030 // ************************************************************************** //
0031 
0032 /// This class implements test observer interface and updates test progress as test units finish or get aborted
0033 class BOOST_TEST_DECL progress_monitor_t : public test_observer {
0034 public:
0035     /// @name Test observer interface
0036     /// @{
0037     void    test_start( counter_t test_cases_amount, test_unit_id ) BOOST_OVERRIDE;
0038     void    test_aborted() BOOST_OVERRIDE;
0039 
0040     void    test_unit_finish( test_unit const&, unsigned long ) BOOST_OVERRIDE;
0041     void    test_unit_skipped( test_unit const&, const_string ) BOOST_OVERRIDE;
0042 
0043     int     priority() BOOST_OVERRIDE { return 4; }
0044     /// @}
0045 
0046     /// @name Configuration
0047     /// @{
0048     void            set_stream( std::ostream& );
0049     /// @}
0050 
0051     /// Singleton pattern
0052     BOOST_TEST_SINGLETON_CONS( progress_monitor_t )
0053 }; // progress_monitor_t
0054 
0055 BOOST_TEST_SINGLETON_INST( progress_monitor )
0056 
0057 } // namespace unit_test
0058 } // namespace boost
0059 
0060 //____________________________________________________________________________//
0061 
0062 #include <boost/test/detail/enable_warnings.hpp>
0063 
0064 #endif // BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
0065