Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // (c) Copyright Raffi Enficiaud 2017.
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 an observer that monitors the init of the unit test framework
0010 // ***************************************************************************
0011 
0012 #ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
0013 #define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
0014 
0015 // Boost.Test
0016 #include <boost/test/tree/observer.hpp>
0017 
0018 #include <boost/test/detail/global_typedef.hpp>
0019 #include <boost/test/detail/fwd_decl.hpp>
0020 
0021 #include <boost/test/detail/suppress_warnings.hpp>
0022 
0023 //____________________________________________________________________________//
0024 
0025 namespace boost {
0026 namespace unit_test {
0027 
0028 // ************************************************************************** //
0029 /// @brief Monitors the init of the framework
0030 ///
0031 /// This class collects the state of the init/termination of the unit test framework.
0032 ///
0033 /// @see boost::unit_test::test_observer
0034 class BOOST_TEST_DECL framework_init_observer_t : public test_observer {
0035 public:
0036 
0037     framework_init_observer_t(): m_has_failure( false ) {}
0038 
0039     void        test_start( counter_t, test_unit_id ) BOOST_OVERRIDE;
0040 
0041     void        assertion_result( unit_test::assertion_result ) BOOST_OVERRIDE;
0042     void        exception_caught( execution_exception const& ) BOOST_OVERRIDE;
0043     void        test_aborted() BOOST_OVERRIDE;
0044 
0045     int         priority() BOOST_OVERRIDE { return 0; }
0046 
0047     void                clear();
0048 
0049     /// Indicates if a failure has been recorded so far
0050     bool                has_failed( ) const;
0051 
0052 private:
0053     bool m_has_failure;
0054 };
0055 
0056 } // namespace unit_test
0057 } // namespace boost
0058 
0059 #include <boost/test/detail/enable_warnings.hpp>
0060 
0061 #endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER