forked from boostorg/exception
BOOST_NO_EXCEPTIONS tests updated for [noreturn]
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/.vscode/ipch/*
|
@ -5,19 +5,16 @@
|
|||||||
|
|
||||||
#define BOOST_NO_EXCEPTIONS
|
#define BOOST_NO_EXCEPTIONS
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
|
||||||
|
|
||||||
class my_exception: public std::exception { };
|
class my_exception: public std::exception { };
|
||||||
|
|
||||||
bool called=false;
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
{
|
{
|
||||||
void
|
void
|
||||||
throw_exception( std::exception const & )
|
throw_exception( std::exception const & )
|
||||||
{
|
{
|
||||||
called=true;
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,6 +22,5 @@ int
|
|||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
boost::throw_exception(my_exception());
|
boost::throw_exception(my_exception());
|
||||||
BOOST_TEST(called);
|
return 1;
|
||||||
return boost::report_errors();
|
|
||||||
}
|
}
|
||||||
|
@ -6,19 +6,16 @@
|
|||||||
#define BOOST_NO_EXCEPTIONS
|
#define BOOST_NO_EXCEPTIONS
|
||||||
#define BOOST_EXCEPTION_DISABLE
|
#define BOOST_EXCEPTION_DISABLE
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
|
||||||
|
|
||||||
class my_exception: public std::exception { };
|
class my_exception: public std::exception { };
|
||||||
|
|
||||||
bool called=false;
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
boost
|
boost
|
||||||
{
|
{
|
||||||
void
|
void
|
||||||
throw_exception( std::exception const & )
|
throw_exception( std::exception const & )
|
||||||
{
|
{
|
||||||
called=true;
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,6 +23,5 @@ int
|
|||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
boost::throw_exception(my_exception());
|
boost::throw_exception(my_exception());
|
||||||
BOOST_TEST(called);
|
return 1;
|
||||||
return boost::report_errors();
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user