]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 | |
9 | /// @brief Contains the formatter for the Human Readable Format (HRF) | |
10 | // *************************************************************************** | |
11 | ||
12 | #ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER | |
13 | #define BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER | |
14 | ||
15 | // Boost.Test | |
16 | #include <boost/test/detail/global_typedef.hpp> | |
17 | #include <boost/test/unit_test_log_formatter.hpp> | |
18 | ||
19 | #include <boost/test/detail/suppress_warnings.hpp> | |
20 | ||
21 | //____________________________________________________________________________// | |
22 | ||
23 | namespace boost { | |
24 | namespace unit_test { | |
25 | namespace output { | |
26 | ||
27 | // ************************************************************************** // | |
28 | // ************** compiler_log_formatter ************** // | |
29 | // ************************************************************************** // | |
30 | ||
31 | //!@brief Log formatter for the Human Readable Format (HRF) log format | |
32 | class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter { | |
33 | public: | |
34 | compiler_log_formatter() : m_color_output( false ) {} | |
35 | ||
36 | // Formatter interface | |
37 | void log_start( std::ostream&, counter_t test_cases_amount ); | |
38 | void log_finish( std::ostream& ); | |
39 | void log_build_info( std::ostream& ); | |
40 | ||
41 | void test_unit_start( std::ostream&, test_unit const& tu ); | |
42 | void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed ); | |
43 | void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason ); | |
44 | ||
45 | void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex ); | |
46 | void log_exception_finish( std::ostream& ); | |
47 | ||
48 | void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let ); | |
49 | void log_entry_value( std::ostream&, const_string value ); | |
50 | void log_entry_value( std::ostream&, lazy_ostream const& value ); | |
51 | void log_entry_finish( std::ostream& ); | |
52 | ||
53 | void entry_context_start( std::ostream&, log_level ); | |
54 | void log_entry_context( std::ostream&, const_string ); | |
55 | void entry_context_finish( std::ostream& ); | |
56 | ||
57 | protected: | |
58 | virtual void print_prefix( std::ostream&, const_string file, std::size_t line ); | |
59 | ||
60 | // Data members | |
61 | bool m_color_output; | |
62 | }; | |
63 | ||
64 | } // namespace output | |
65 | } // namespace unit_test | |
66 | } // namespace boost | |
67 | ||
68 | #include <boost/test/detail/enable_warnings.hpp> | |
69 | ||
70 | #endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER |