[CAPI Changed] Enum value names and scan cloud
[platform/upstream/csr-framework.git] / test / 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
13
14 #pragma once
15
16 #include <boost/test/unit_test_log_formatter.hpp>
17
18 namespace Csr {
19 namespace Test {
20
21 class colour_log_formatter : public boost::unit_test::unit_test_log_formatter {
22 public:
23         // Formatter interface
24         colour_log_formatter() : m_isTestCaseFailed(false) {}
25         void log_start(
26                 std::ostream &,
27                 boost::unit_test::counter_t test_cases_amount);
28         void log_finish(std::ostream &);
29         void log_build_info(std::ostream &);
30
31         void test_unit_start(
32                 std::ostream &,
33                 boost::unit_test::test_unit const &tu);
34         void test_unit_finish(
35                 std::ostream &,
36                 boost::unit_test::test_unit const &tu,
37                 unsigned long elapsed);
38         void test_unit_skipped(
39                 std::ostream &,
40                 boost::unit_test::test_unit const &tu);
41
42         void log_exception(
43                 std::ostream &,
44                 boost::unit_test::log_checkpoint_data const &,
45                 boost::execution_exception const &ex);
46
47         void log_entry_start(
48                 std::ostream &,
49                 boost::unit_test::log_entry_data const &,
50                 log_entry_types let);
51         void log_entry_value(
52                 std::ostream &,
53                 boost::unit_test::const_string value);
54         void log_entry_value(
55                 std::ostream &,
56                 boost::unit_test::lazy_ostream const &value);
57         void log_entry_finish(std::ostream &);
58
59 private:
60         bool m_isTestCaseFailed;
61 };
62
63 }
64 }