summaryrefslogtreecommitdiff
path: root/boost/test/utils/runtime/validation.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/test/utils/runtime/validation.hpp')
-rw-r--r--boost/test/utils/runtime/validation.hpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/boost/test/utils/runtime/validation.hpp b/boost/test/utils/runtime/validation.hpp
index bcfbc9f062..54163dc6a6 100644
--- a/boost/test/utils/runtime/validation.hpp
+++ b/boost/test/utils/runtime/validation.hpp
@@ -1,6 +1,6 @@
-// (C) Copyright Gennadiy Rozental 2005-2008.
+// (C) Copyright Gennadiy Rozental 2005-2014.
// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
+// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
@@ -12,33 +12,34 @@
// Description : defines exceptions and validation tools
// ***************************************************************************
-#ifndef BOOST_RT_VALIDATION_HPP_062604GER
-#define BOOST_RT_VALIDATION_HPP_062604GER
+#ifndef BOOST_TEST_UTILS_RUNTIME_VALIDATION_HPP
+#define BOOST_TEST_UTILS_RUNTIME_VALIDATION_HPP
// Boost.Runtime.Parameter
#include <boost/test/utils/runtime/config.hpp>
// Boost.Test
#include <boost/test/utils/class_properties.hpp>
+#include <boost/test/detail/throw_exception.hpp>
// Boost
#include <boost/shared_ptr.hpp>
// STL
-#ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+#ifdef BOOST_TEST_UTILS_RUNTIME_PARAM_EXCEPTION_INHERIT_STD
#include <stdexcept>
#endif
namespace boost {
-namespace BOOST_RT_PARAM_NAMESPACE {
+namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE {
// ************************************************************************** //
// ************** runtime::logic_error ************** //
// ************************************************************************** //
-class logic_error
-#ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+class logic_error
+#ifdef BOOST_TEST_UTILS_RUNTIME_PARAM_EXCEPTION_INHERIT_STD
: public std::exception
#endif
{
@@ -46,10 +47,12 @@ class logic_error
public:
// Constructor // !! could we eliminate shared_ptr
explicit logic_error( cstring msg ) : m_msg( new dstring( msg.begin(), msg.size() ) ) {}
- ~logic_error() throw() {}
+ ~logic_error() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
dstring const& msg() const { return *m_msg; }
- virtual char_type const* what() const throw() { return m_msg->c_str(); }
+ virtual char_type const* what() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_msg->c_str(); }
private:
dstring_ptr m_msg;
@@ -62,21 +65,21 @@ private:
inline void
report_logic_error( format_stream& msg )
{
- throw BOOST_RT_PARAM_NAMESPACE::logic_error( msg.str() );
+ BOOST_TEST_IMPL_THROW( BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE::logic_error( msg.str() ) );
}
//____________________________________________________________________________//
-#define BOOST_RT_PARAM_REPORT_LOGIC_ERROR( msg ) \
- boost::BOOST_RT_PARAM_NAMESPACE::report_logic_error( format_stream().ref() << msg )
+#define BOOST_TEST_UTILS_RUNTIME_PARAM_REPORT_LOGIC_ERROR( msg ) \
+ boost::BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE::report_logic_error( format_stream().ref() << msg )
-#define BOOST_RT_PARAM_VALIDATE_LOGIC( b, msg ) \
- if( b ) {} else BOOST_RT_PARAM_REPORT_LOGIC_ERROR( msg )
+#define BOOST_TEST_UTILS_RUNTIME_PARAM_VALIDATE_LOGIC( b, msg ) \
+ if( b ) {} else BOOST_TEST_UTILS_RUNTIME_PARAM_REPORT_LOGIC_ERROR( msg )
//____________________________________________________________________________//
-} // namespace BOOST_RT_PARAM_NAMESPACE
+} // namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE
} // namespace boost
-#endif // BOOST_RT_VALIDATION_HPP_062604GER
+#endif // BOOST_TEST_UTILS_RUNTIME_VALIDATION_HPP