Fix build for boost 1.71.0
[platform/core/security/libwebappenc.git] / tests / colour_log_formatter.h
1 /*
2  *  Boost Software License - Version 1.0 - August 17th, 2003
3  *
4  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5  *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6  *  FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
7  *  SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
8  *  FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
9  *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
10  *  DEALINGS IN THE SOFTWARE.
11  */
12 #pragma once
13
14 #include <boost/test/unit_test_log_formatter.hpp>
15
16 namespace Wae {
17 namespace Test {
18
19 class colour_log_formatter : public boost::unit_test::unit_test_log_formatter {
20 public:
21         // Formatter interface
22         colour_log_formatter() : m_isTestCaseFailed(false) {}
23         void log_start(
24                 std::ostream &,
25                 boost::unit_test::counter_t test_cases_amount);
26         void log_finish(std::ostream &);
27         void log_build_info(std::ostream &);
28         void log_build_info(std::ostream &output, bool log_build_info = true);
29
30         void test_unit_start(
31                 std::ostream &,
32                 boost::unit_test::test_unit const &tu);
33         void test_unit_finish(
34                 std::ostream &,
35                 boost::unit_test::test_unit const &tu,
36                 unsigned long elapsed);
37         void test_unit_skipped(
38                 std::ostream &,
39                 boost::unit_test::test_unit const &tu);
40
41         void log_exception(
42                 std::ostream &,
43                 boost::unit_test::log_checkpoint_data const &,
44                 boost::execution_exception const &ex);
45         void log_exception_start(
46                 std::ostream &,
47                 boost::unit_test::log_checkpoint_data const &,
48                 boost::execution_exception const &ex);
49         void log_exception_finish(std::ostream &os);
50
51         void log_entry_start(
52                 std::ostream &,
53                 boost::unit_test::log_entry_data const &,
54                 log_entry_types let);
55         void log_entry_value(
56                 std::ostream &,
57                 boost::unit_test::const_string value);
58         void log_entry_value(
59                 std::ostream &,
60                 boost::unit_test::lazy_ostream const &value);
61         void log_entry_finish(std::ostream &);
62
63         void entry_context_start(std::ostream& os, boost::unit_test::log_level l);
64         void log_entry_context(std::ostream& os,
65                                                    boost::unit_test::const_string value);
66         void entry_context_finish(std::ostream& os);
67 #if BOOST_VERSION >= 106500
68         void    log_entry_context(
69                 std::ostream& os,
70                 boost::unit_test::log_level l,
71                 boost::unit_test::const_string value);
72         void    entry_context_finish(
73                 std::ostream& os,
74                 boost::unit_test::log_level l);
75 #endif
76
77 private:
78         bool m_isTestCaseFailed;
79 };
80
81 }
82 }