Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 1 | // (C) Copyright Gennadiy Rozental 2005-2008. |
| 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$ |
| 9 | // |
| 10 | // Version : $Revision: 49312 $ |
| 11 | // |
| 12 | // Description : defines simple text based progress monitor |
| 13 | // *************************************************************************** |
| 14 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 15 | #ifndef NDNBOOST_TEST_PROGRESS_MONITOR_HPP_020105GER |
| 16 | #define NDNBOOST_TEST_PROGRESS_MONITOR_HPP_020105GER |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 17 | |
| 18 | // Boost.Test |
| 19 | #include <ndnboost/test/test_observer.hpp> |
| 20 | #include <ndnboost/test/utils/trivial_singleton.hpp> |
| 21 | |
| 22 | // STL |
| 23 | #include <iosfwd> // for std::ostream& |
| 24 | |
| 25 | #include <ndnboost/test/detail/suppress_warnings.hpp> |
| 26 | |
| 27 | //____________________________________________________________________________// |
| 28 | |
| 29 | namespace ndnboost { |
| 30 | |
| 31 | namespace unit_test { |
| 32 | |
| 33 | // ************************************************************************** // |
| 34 | // ************** progress_monitor ************** // |
| 35 | // ************************************************************************** // |
| 36 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 37 | class NDNBOOST_TEST_DECL progress_monitor_t : public test_observer, public singleton<progress_monitor_t> { |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 38 | public: |
| 39 | // test observer interface |
| 40 | void test_start( counter_t test_cases_amount ); |
| 41 | void test_finish() {} |
| 42 | void test_aborted(); |
| 43 | |
| 44 | void test_unit_start( test_unit const& ) {} |
| 45 | void test_unit_finish( test_unit const&, unsigned long ); |
| 46 | void test_unit_skipped( test_unit const& ); |
| 47 | void test_unit_aborted( test_unit const& ) {} |
| 48 | |
| 49 | void assertion_result( bool ) {} |
| 50 | void exception_caught( execution_exception const& ) {} |
| 51 | |
| 52 | // configuration |
| 53 | void set_stream( std::ostream& ); |
| 54 | |
| 55 | private: |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 56 | NDNBOOST_TEST_SINGLETON_CONS( progress_monitor_t ); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 57 | }; // progress_monitor_t |
| 58 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 59 | NDNBOOST_TEST_SINGLETON_INST( progress_monitor ) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 60 | |
| 61 | } // namespace unit_test |
| 62 | |
| 63 | } // namespace ndnboost |
| 64 | |
| 65 | //____________________________________________________________________________// |
| 66 | |
| 67 | #include <ndnboost/test/detail/enable_warnings.hpp> |
| 68 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 69 | #endif // NDNBOOST_TEST_PROGRESS_MONITOR_HPP_020105GER |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 70 | |