Index: libs/test/test/prg_exec_fail5.cpp =================================================================== --- libs/test/test/prg_exec_fail5.cpp (revision 0) +++ libs/test/test/prg_exec_fail5.cpp (revision 0) @@ -0,0 +1,38 @@ +// (C) Copyright Gennadiy Rozental 2001-2008. +// (C) Copyright Beman Dawes 2001. +// 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/test for the library home page. +// +// File : $RCSfile$ +// +// Version : $Revision$ +// +// Description : tests the ability of Program Execution Monitor to catch +// unexpected exceptions when std::bad_exception is allowed. +// Should fail during run. +// *************************************************************************** + +#include + +#include + +void func() throw(std::bad_exception) +{ + throw "Test error by throwing C-style string exception"; +} + +int +cpp_main( int argc, char *[] ) // note the name +{ + if( argc > 0 ) // to prevent the unreachable return warning + func(); + + return 0; +} + +//____________________________________________________________________________// + +// EOF Property changes on: libs/test/test/prg_exec_fail5.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: libs/test/test/prg_exec_fail6.cpp =================================================================== --- libs/test/test/prg_exec_fail6.cpp (revision 0) +++ libs/test/test/prg_exec_fail6.cpp (revision 0) @@ -0,0 +1,38 @@ +// (C) Copyright Gennadiy Rozental 2001-2008. +// (C) Copyright Beman Dawes 2001. +// 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/test for the library home page. +// +// File : $RCSfile$ +// +// Version : $Revision$ +// +// Description : tests the ability of Program Execution Monitor to catch +// unexpected exceptions when std::bad_exception is not allowed. +// Should fail during run. +// *************************************************************************** + +#include + +#include + +void func() throw() +{ + throw "Test error by throwing C-style string exception"; +} + +int +cpp_main( int argc, char *[] ) // note the name +{ + if( argc > 0 ) // to prevent the unreachable return warning + func(); + + return 0; +} + +//____________________________________________________________________________// + +// EOF Property changes on: libs/test/test/prg_exec_fail6.cpp ___________________________________________________________________ Name: svn:eol-style + native Index: libs/test/test/Jamfile.v2 =================================================================== --- libs/test/test/Jamfile.v2 (revision 48903) +++ libs/test/test/Jamfile.v2 (working copy) @@ -38,6 +38,8 @@ [ test-btl-lib run-fail : prg_exec_fail2 : boost_prg_exec_monitor/static ] [ test-btl-lib run-fail : prg_exec_fail3 : boost_prg_exec_monitor/static ] [ test-btl-lib run-fail : prg_exec_fail4 : boost_prg_exec_monitor/static ] + [ test-btl-lib run-fail : prg_exec_fail5 : boost_prg_exec_monitor/static ] + [ test-btl-lib run-fail : prg_exec_fail6 : boost_prg_exec_monitor/static ] ; test-suite "unit_test_framework_test"