Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame^] | 1 | // (C) Copyright Gennadiy Rozental 2005-2008. |
| 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: 57992 $ |
| 11 | // |
| 12 | // Description : contains 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 <ndnboost/test/detail/global_typedef.hpp> |
| 20 | #include <ndnboost/test/unit_test_log_formatter.hpp> |
| 21 | |
| 22 | // STL |
| 23 | #include <cstddef> // std::size_t |
| 24 | |
| 25 | #include <ndnboost/test/detail/suppress_warnings.hpp> |
| 26 | |
| 27 | //____________________________________________________________________________// |
| 28 | |
| 29 | namespace ndnboost { |
| 30 | |
| 31 | namespace unit_test { |
| 32 | |
| 33 | namespace output { |
| 34 | |
| 35 | // ************************************************************************** // |
| 36 | // ************** xml_log_formatter ************** // |
| 37 | // ************************************************************************** // |
| 38 | |
| 39 | class xml_log_formatter : public unit_test_log_formatter { |
| 40 | public: |
| 41 | // Formatter interface |
| 42 | void log_start( std::ostream&, counter_t test_cases_amount ); |
| 43 | void log_finish( std::ostream& ); |
| 44 | void log_build_info( std::ostream& ); |
| 45 | |
| 46 | void test_unit_start( std::ostream&, test_unit const& tu ); |
| 47 | void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed ); |
| 48 | void test_unit_skipped( std::ostream&, test_unit const& tu ); |
| 49 | |
| 50 | void log_exception( std::ostream&, log_checkpoint_data const&, execution_exception const& ex ); |
| 51 | |
| 52 | void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let ); |
| 53 | using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set |
| 54 | void log_entry_value( std::ostream&, const_string value ); |
| 55 | void log_entry_finish( std::ostream& ); |
| 56 | |
| 57 | private: |
| 58 | // Data members |
| 59 | const_string m_curr_tag; |
| 60 | }; |
| 61 | |
| 62 | } // namespace output |
| 63 | |
| 64 | } // namespace unit_test |
| 65 | |
| 66 | } // namespace ndnboost |
| 67 | |
| 68 | //____________________________________________________________________________// |
| 69 | |
| 70 | #include <ndnboost/test/detail/enable_warnings.hpp> |
| 71 | |
| 72 | #endif // BOOST_TEST_XML_LOG_FORMATTER_020105GER |