• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #ifndef BOOST_CONTRACT_TEST_OUT_INLINED_HPP_
3 #define BOOST_CONTRACT_TEST_OUT_INLINED_HPP_
4 
5 // Copyright (C) 2008-2018 Lorenzo Caminiti
6 // Distributed under the Boost Software License, Version 1.0 (see accompanying
7 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
8 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
9 
10 #include "out.hpp"
11 #include <iostream>
12 
13 namespace boost { namespace contract { namespace test { namespace detail {
14 
15 namespace out_ {
16     std::string out;
17 }
18 
out()19 std::string out() { return out_::out; }
20 
out(std::string const & text)21 void out(std::string const& text) {
22     if(text == "") out_::out = "";
23     else {
24         out_::out = out_::out + text;
25         std::clog << text;
26         std::clog.flush();
27     }
28 }
29 
30 } } } }
31 
32 #endif // #include guard
33 
34