diff options
Diffstat (limited to 'boost/test/utils/runtime/env/environment.hpp')
-rw-r--r-- | boost/test/utils/runtime/env/environment.hpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/boost/test/utils/runtime/env/environment.hpp b/boost/test/utils/runtime/env/environment.hpp index f3170ff53a..62b2ae6dc1 100644 --- a/boost/test/utils/runtime/env/environment.hpp +++ b/boost/test/utils/runtime/env/environment.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. @@ -9,11 +9,11 @@ // // Version : $Revision$ // -// Description : defines and implements inline model of program environment +// Description : defines and implements inline model of program environment // *************************************************************************** -#ifndef BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER -#define BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER +#ifndef BOOST_TEST_UTILS_RUNTIME_ENV_ENVIRONMENT_HPP +#define BOOST_TEST_UTILS_RUNTIME_ENV_ENVIRONMENT_HPP #ifdef UNDER_CE #error Windows CE does not support environment variables. @@ -29,15 +29,12 @@ #include <boost/test/utils/runtime/env/modifier.hpp> #include <boost/test/utils/runtime/env/variable.hpp> -// Boost.Test -#include <boost/test/utils/callback.hpp> - // Boost #include <boost/optional.hpp> namespace boost { -namespace BOOST_RT_PARAM_NAMESPACE { +namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE { // ************************************************************************** // // ************** runtime::environment implementation ************** // @@ -56,7 +53,7 @@ init_new_var( cstring var_name, Modifiers m = nfp::no_params ) cstring str_value = sys_read_var( new_vd.m_var_name ); if( !str_value.is_empty() ) { - try { + BOOST_TEST_IMPL_TRY { boost::optional<T> value; if( m.has( interpreter ) ) @@ -70,7 +67,7 @@ init_new_var( cstring var_name, Modifiers m = nfp::no_params ) arg_value<T>( *new_vd.m_value ) = *value; } } - catch( ... ) { // !! could we do that + BOOST_TEST_IMPL_CATCHALL() { // !! could we do that // !! should we report an error? } } @@ -158,15 +155,17 @@ namespace environment { namespace env = environment; -} // namespace BOOST_RT_PARAM_NAMESPACE +} // namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE } // namespace boost -#ifndef BOOST_RT_PARAM_OFFLINE +#ifndef BOOST_TEST_UTILS_RUNTIME_PARAM_OFFLINE -#define BOOST_RT_PARAM_INLINE inline -#include <boost/test/utils/runtime/env/environment.ipp> +#ifndef BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE +# define BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE inline +#endif +# include <boost/test/utils/runtime/env/environment.ipp> #endif -#endif // BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER +#endif // BOOST_TEST_UTILS_RUNTIME_ENV_ENVIRONMENT_HPP |