Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:09:51

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 Contains the formatter for the Human Readable Format (HRF)
0010 // ***************************************************************************
0011 
0012 #ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
0013 #define BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
0014 
0015 // Boost.Test
0016 #include <boost/test/detail/global_typedef.hpp>
0017 #include <boost/test/unit_test_log_formatter.hpp>
0018 
0019 #include <boost/test/utils/setcolor.hpp>
0020 
0021 #include <boost/test/detail/suppress_warnings.hpp>
0022 
0023 //____________________________________________________________________________//
0024 
0025 namespace boost {
0026 namespace unit_test {
0027 namespace output {
0028 
0029 // ************************************************************************** //
0030 // **************             compiler_log_formatter           ************** //
0031 // ************************************************************************** //
0032 
0033 //!@brief Log formatter for the Human Readable Format (HRF) log format
0034 class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter {
0035 public:
0036     compiler_log_formatter() : m_color_output( false ), m_color_state() {}
0037 
0038     // Formatter interface
0039     void    log_start( std::ostream&, counter_t test_cases_amount ) BOOST_OVERRIDE;
0040     void    log_finish( std::ostream& ) BOOST_OVERRIDE;
0041     void    log_build_info( std::ostream&, bool ) BOOST_OVERRIDE;
0042 
0043     void    test_unit_start( std::ostream&, test_unit const& tu ) BOOST_OVERRIDE;
0044     void    test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed ) BOOST_OVERRIDE;
0045     void    test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason ) BOOST_OVERRIDE;
0046 
0047     void    log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex ) BOOST_OVERRIDE;
0048     void    log_exception_finish( std::ostream& ) BOOST_OVERRIDE;
0049 
0050     void    log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let ) BOOST_OVERRIDE;
0051     void    log_entry_value( std::ostream&, const_string value ) BOOST_OVERRIDE;
0052     void    log_entry_value( std::ostream&, lazy_ostream const& value ) BOOST_OVERRIDE;
0053     void    log_entry_finish( std::ostream& ) BOOST_OVERRIDE;
0054 
0055     void    entry_context_start( std::ostream&, log_level ) BOOST_OVERRIDE;
0056     void    log_entry_context( std::ostream&, log_level l, const_string ) BOOST_OVERRIDE;
0057     void    entry_context_finish( std::ostream&, log_level l ) BOOST_OVERRIDE;
0058 
0059 protected:
0060     virtual void    print_prefix( std::ostream&, const_string file, std::size_t line );
0061 
0062     // Data members
0063     bool    m_color_output;
0064     utils::setcolor::state m_color_state;
0065 };
0066 
0067 } // namespace output
0068 } // namespace unit_test
0069 } // namespace boost
0070 
0071 #include <boost/test/detail/enable_warnings.hpp>
0072 
0073 #endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER