diff --git a/include/boost/test/impl/cpp_main.ipp b/include/boost/test/impl/cpp_main.ipp index aaa5cabfc5..39cccc3898 100644 --- a/include/boost/test/impl/cpp_main.ipp +++ b/include/boost/test/impl/cpp_main.ipp @@ -24,6 +24,7 @@ // Boost #include // for exit codes #include // for workarounds +#include // for BOOST_PLAT_ macros // STL #include @@ -69,7 +70,11 @@ prg_exec_monitor_main( int (*cpp_main)( int argc, char* argv[] ), int argc, char int result = 0; BOOST_TEST_I_TRY { +#if BOOST_PLAT_WINDOWS_RUNTIME + boost::unit_test::const_string p( "no" ); +#else boost::unit_test::const_string p( std::getenv( "BOOST_TEST_CATCH_SYSTEM_ERRORS" ) ); +#endif ::boost::execution_monitor ex_mon; ex_mon.p_catch_system_errors.value = p != "no"; @@ -102,7 +107,11 @@ prg_exec_monitor_main( int (*cpp_main)( int argc, char* argv[] ), int argc, char // like the clutter. Use an environment variable to avoid command // line argument modifications; for use in production programs // that's a no-no in some organizations. +#if !BOOST_PLAT_WINDOWS_RUNTIME ::boost::unit_test::const_string p( std::getenv( "BOOST_PRG_MON_CONFIRM" ) ); +#else + ::boost::unit_test::const_string p( "yes" ); +#endif if( p != "no" ) { std::cerr << std::flush << "no errors detected" << std::endl; } diff --git a/include/boost/test/impl/debug.ipp b/include/boost/test/impl/debug.ipp index b59a011e5e..42ffb17618 100644 --- a/include/boost/test/impl/debug.ipp +++ b/include/boost/test/impl/debug.ipp @@ -23,8 +23,11 @@ #include #include +// Boost +#include + // Implementation on Windows -#if defined(_WIN32) && !defined(UNDER_CE) && !defined(BOOST_DISABLE_WIN32) // ******* WIN32 +#if defined(_WIN32) && !defined(UNDER_CE) && !defined(BOOST_DISABLE_WIN32) && BOOST_PLAT_WINDOWS_DESKTOP // ******* WIN32 # define BOOST_WIN32_BASED_DEBUG diff --git a/include/boost/test/utils/runtime/env/fetch.hpp b/include/boost/test/utils/runtime/env/fetch.hpp index 48702529b8..f9363dc4ff 100644 --- a/include/boost/test/utils/runtime/env/fetch.hpp +++ b/include/boost/test/utils/runtime/env/fetch.hpp @@ -21,6 +21,9 @@ #include +// Boost +#include + // C Runtime #include @@ -40,10 +43,14 @@ namespace env_detail { inline std::pair sys_read_var( cstring var_name ) { +#if BOOST_PLAT_WINDOWS_RUNTIME + return std::make_pair( cstring(nullptr), false ); +#else using namespace std; char const* res = getenv( var_name.begin() ); return std::make_pair( cstring(res), res != NULL ); +#endif } #ifdef BOOST_MSVC