Migrate to openssl3
[platform/core/security/libcryptsvc.git] / test / colour_log_formatter.h
1 /*
2  *  (C) Copyright Gennadiy Rozental 2005-2008.
3  *  Distributed under the Boost Software License, Version 1.0.
4  *  (See accompanying file LICENSE_1_0.txt or copy at
5  *  http://www.boost.org/LICENSE_1_0.txt)
6  *
7  *  See http://www.boost.org/libs/test for the library home page.
8  */
9 /*
10  * @file        colour_log_formatter.h
11  * @author      Zofia Abramowska (z.abramowska@samsung.com)
12  * @version
13  * @brief
14  */
15 #pragma once
16 #include <boost/test/unit_test_log_formatter.hpp>
17
18 namespace cryptsvc {
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 #if BOOST_VERSION >= 107000
28         void log_build_info(std::ostream & out, bool );
29 #else
30         void    log_build_info(std::ostream &);
31 #endif
32
33         void    test_unit_start(
34                 std::ostream &,
35                 boost::unit_test::test_unit const &tu);
36         void    test_unit_finish(
37                 std::ostream &,
38                 boost::unit_test::test_unit const &tu,
39                 unsigned long elapsed);
40         void    test_unit_skipped(
41                 std::ostream &,
42                 boost::unit_test::test_unit const &tu);
43
44         void    log_exception(std::ostream &,
45                                                   boost::unit_test::log_checkpoint_data const &,
46                                                   boost::execution_exception const &ex);
47         void    log_exception_start(
48                 std::ostream &,
49                 boost::unit_test::log_checkpoint_data const &,
50                 boost::execution_exception const &ex);
51         void    log_exception_finish(
52                 std::ostream &);
53
54         void    log_entry_start(
55                 std::ostream &,
56                 boost::unit_test::log_entry_data const &,
57                 log_entry_types let);
58         void    log_entry_value(
59                 std::ostream &,
60                 boost::unit_test::const_string value);
61         void    log_entry_value(
62                 std::ostream &,
63                 boost::unit_test::lazy_ostream const &value);
64         void    log_entry_finish(std::ostream &);
65
66         void    entry_context_start(
67                 std::ostream &,
68                 boost::unit_test::log_level l);
69         void    log_entry_context(
70                 std::ostream &,
71                 boost::unit_test::const_string value);
72         void    entry_context_finish(std::ostream &);
73
74         void    log_entry_context(
75                 std::ostream &,
76                 boost::unit_test::log_level,
77                 boost::unit_test::const_string);
78         void    entry_context_finish(
79                 std::ostream &,
80                 boost::unit_test::log_level);
81
82 private:
83         bool m_isTestCaseFailed;
84 };
85 } // namespace cryptsvc