Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:01:00

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 //! An observer for monitoring the success/failure of the other observers
0010 // ***************************************************************************
0011 
0012 #ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
0013 #define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
0014 
0015 // Boost.Test
0016 #include <boost/test/test_framework_init_observer.hpp>
0017 #include <boost/test/framework.hpp>
0018 #include <boost/test/detail/suppress_warnings.hpp>
0019 
0020 //____________________________________________________________________________//
0021 
0022 namespace boost {
0023 namespace unit_test {
0024 
0025 
0026 //____________________________________________________________________________//
0027 
0028 // ************************************************************************** //
0029 // **************           framework_init_observer_t          ************** //
0030 // ************************************************************************** //
0031 
0032 void
0033 framework_init_observer_t::clear()
0034 {
0035     m_has_failure = false;
0036 }
0037 
0038 //____________________________________________________________________________//
0039 
0040 void
0041 framework_init_observer_t::test_start( counter_t, test_unit_id )
0042 {
0043     clear();
0044 }
0045 
0046 //____________________________________________________________________________//
0047 
0048 void
0049 framework_init_observer_t::assertion_result( unit_test::assertion_result ar )
0050 {
0051     switch( ar ) {
0052     case AR_FAILED: m_has_failure = true; break;
0053     default:
0054         break;
0055     }
0056 }
0057 
0058 //____________________________________________________________________________//
0059 
0060 void
0061 framework_init_observer_t::exception_caught( execution_exception const& )
0062 {
0063     m_has_failure = true;
0064 }
0065 
0066 void
0067 framework_init_observer_t::test_aborted()
0068 {
0069     m_has_failure = true;
0070 }
0071 
0072 
0073 //____________________________________________________________________________//
0074 
0075 bool
0076 framework_init_observer_t::has_failed() const
0077 {
0078     return m_has_failure;
0079 }
0080 
0081 //____________________________________________________________________________//
0082 
0083 } // namespace unit_test
0084 } // namespace boost
0085 
0086 #include <boost/test/detail/enable_warnings.hpp>
0087 
0088 #endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER