]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/test/impl/test_framework_init_observer.ipp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / test / impl / test_framework_init_observer.ipp
CommitLineData
b32b8144
FG
1// (c) Copyright Raffi Enficiaud 2017.
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//! An observer for monitoring the success/failure of the other observers
10// ***************************************************************************
11
12#ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
13#define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
14
15// Boost.Test
16#include <boost/test/test_framework_init_observer.hpp>
17#include <boost/test/framework.hpp>
18#include <boost/test/detail/suppress_warnings.hpp>
19
20//____________________________________________________________________________//
21
22namespace boost {
23namespace unit_test {
24
25
26//____________________________________________________________________________//
27
28// ************************************************************************** //
29// ************** framework_init_observer_t ************** //
30// ************************************************************************** //
31
b32b8144
FG
32void
33framework_init_observer_t::clear()
34{
f67539c2 35 m_has_failure = false;
b32b8144
FG
36}
37
38//____________________________________________________________________________//
39
40void
f67539c2 41framework_init_observer_t::test_start( counter_t, test_unit_id )
b32b8144
FG
42{
43 clear();
44}
45
46//____________________________________________________________________________//
47
48void
49framework_init_observer_t::assertion_result( unit_test::assertion_result ar )
50{
b32b8144 51 switch( ar ) {
f67539c2 52 case AR_FAILED: m_has_failure = true; break;
b32b8144
FG
53 default:
54 break;
55 }
56}
57
58//____________________________________________________________________________//
59
60void
61framework_init_observer_t::exception_caught( execution_exception const& )
62{
f67539c2 63 m_has_failure = true;
b32b8144
FG
64}
65
66void
67framework_init_observer_t::test_aborted()
68{
f67539c2 69 m_has_failure = true;
b32b8144
FG
70}
71
72
73//____________________________________________________________________________//
74
75bool
76framework_init_observer_t::has_failed() const
77{
f67539c2 78 return m_has_failure;
b32b8144
FG
79}
80
81//____________________________________________________________________________//
82
83} // namespace unit_test
84} // namespace boost
85
86#include <boost/test/detail/enable_warnings.hpp>
87
88#endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER