summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/interprocess/test/boost_interprocess_check.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/interprocess/test/boost_interprocess_check.hpp')
-rw-r--r--src/boost/libs/interprocess/test/boost_interprocess_check.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/boost/libs/interprocess/test/boost_interprocess_check.hpp b/src/boost/libs/interprocess/test/boost_interprocess_check.hpp
new file mode 100644
index 00000000..675613c9
--- /dev/null
+++ b/src/boost/libs/interprocess/test/boost_interprocess_check.hpp
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2004-2012. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTERPROCESS_TEST_CHECK_HEADER
+#define BOOST_INTERPROCESS_TEST_CHECK_HEADER
+
+#include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/exceptions.hpp>
+#include <iostream>
+
+namespace boost { namespace interprocess { namespace test {
+
+#define BOOST_INTERPROCESS_CHECK( P ) \
+ if(!(P)) do{ assert(P); std::cout << "Failed: " << #P << " file: " << __FILE__ << " line : " << __LINE__ << std::endl; throw boost::interprocess::interprocess_exception(#P);}while(0)
+
+}}} //namespace boost { namespace interprocess { namespace test {
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif //BOOST_INTERPROCESS_TEST_CHECK_HEADER