1 | ////////////////////////////////////////////////////////////////////////////// |
2 | // |
3 | // (C) Copyright Ion Gaztanaga 2004-2012. Distributed under the Boost |
4 | // Software License, Version 1.0. (See accompanying file |
5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 | // |
7 | // See http://www.boost.org/libs/interprocess for documentation. |
8 | // |
9 | ////////////////////////////////////////////////////////////////////////////// |
10 | |
11 | #ifndef BOOST_INTERPROCESS_TEST_CHECK_HEADER |
12 | #define |
13 | |
14 | #include <boost/interprocess/detail/config_begin.hpp> |
15 | #include <boost/interprocess/exceptions.hpp> |
16 | #include <iostream> |
17 | |
18 | namespace boost { namespace interprocess { namespace test { |
19 | |
20 | #define BOOST_INTERPROCESS_CHECK( P ) \ |
21 | if(!(P)) do{ assert(P); std::cout << "Failed: " << #P << " file: " << __FILE__ << " line : " << __LINE__ << std::endl; throw boost::interprocess::interprocess_exception(#P);}while(0) |
22 | |
23 | }}} //namespace boost { namespace interprocess { namespace test { |
24 | |
25 | #include <boost/interprocess/detail/config_end.hpp> |
26 | |
27 | #endif //BOOST_INTERPROCESS_TEST_CHECK_HEADER |
28 | |