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