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