Line data Source code
1 : // (C) Copyright Gennadiy Rozental 2001. 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$ 11 : // 12 : // Description : contains OF_XML Log formatter definition 13 : // *************************************************************************** 14 : 15 : #ifndef BOOST_TEST_XML_LOG_FORMATTER_020105GER 16 : #define BOOST_TEST_XML_LOG_FORMATTER_020105GER 17 : 18 : // Boost.Test 19 : #include <boost/test/detail/global_typedef.hpp> 20 : #include <boost/test/unit_test_log_formatter.hpp> 21 : 22 : // STL 23 : #include <cstddef> // std::size_t 24 : 25 : #include <boost/test/detail/suppress_warnings.hpp> 26 : 27 : //____________________________________________________________________________// 28 : 29 : namespace boost { 30 : namespace unit_test { 31 : namespace output { 32 : 33 : // ************************************************************************** // 34 : // ************** xml_log_formatter ************** // 35 : // ************************************************************************** // 36 : 37 146 : class xml_log_formatter : public unit_test_log_formatter { 38 : public: 39 : // Formatter interface 40 : void log_start( std::ostream&, counter_t test_cases_amount ) BOOST_OVERRIDE; 41 : void log_finish( std::ostream& ) BOOST_OVERRIDE; 42 : void log_build_info( std::ostream&, bool ) BOOST_OVERRIDE; 43 : 44 : void test_unit_start( std::ostream&, test_unit const& tu ) BOOST_OVERRIDE; 45 : void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed ) BOOST_OVERRIDE; 46 : void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason ) BOOST_OVERRIDE; 47 : 48 : void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex ) BOOST_OVERRIDE; 49 : void log_exception_finish( std::ostream& ) BOOST_OVERRIDE; 50 : 51 : void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let ) BOOST_OVERRIDE; 52 : using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set 53 : void log_entry_value( std::ostream&, const_string value ) BOOST_OVERRIDE; 54 : void log_entry_finish( std::ostream& ) BOOST_OVERRIDE; 55 : 56 : void entry_context_start( std::ostream&, log_level ) BOOST_OVERRIDE; 57 : void log_entry_context( std::ostream&, log_level, const_string ) BOOST_OVERRIDE; 58 : void entry_context_finish( std::ostream&, log_level ) BOOST_OVERRIDE; 59 : 60 : private: 61 : // Data members 62 : const_string m_curr_tag; 63 : bool m_value_closed; 64 : }; 65 : 66 : } // namespace output 67 : } // namespace unit_test 68 : } // namespace boost 69 : 70 : #include <boost/test/detail/enable_warnings.hpp> 71 : 72 : #endif // BOOST_TEST_XML_LOG_FORMATTER_020105GER