forked from boostorg/throw_exception
Add <warnings>extra to test/Jamfile
This commit is contained in:
@ -1,18 +1,21 @@
|
|||||||
# Boost Exception Library test Jamfile
|
# Boost ThrowException Library test Jamfile
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
# Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
# Copyright 2019 Peter Dimov
|
||||||
#
|
#
|
||||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
# 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)
|
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
project : requirements <warnings>extra <warnings-as-errors>on ;
|
||||||
|
|
||||||
run throw_exception_test.cpp ;
|
run throw_exception_test.cpp ;
|
||||||
run throw_exception_no_exceptions_test.cpp ;
|
run throw_exception_no_exceptions_test.cpp ;
|
||||||
run throw_exception_no_integration_test.cpp ;
|
run throw_exception_no_integration_test.cpp ;
|
||||||
run throw_exception_no_both_test.cpp ;
|
run throw_exception_no_both_test.cpp ;
|
||||||
|
|
||||||
compile-fail throw_exception_fail.cpp ;
|
compile-fail throw_exception_fail.cpp : -<warnings-as-errors>on ;
|
||||||
|
|
||||||
run throw_exception_test2.cpp ;
|
run throw_exception_test2.cpp ;
|
||||||
run throw_exception_test3.cpp ;
|
run throw_exception_test3.cpp ;
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
class my_exception: public std::exception {};
|
class my_exception: public std::exception {};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
class my_exception: public std::exception {};
|
class my_exception: public std::exception {};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
|
|
||||||
#define BOOST_EXCEPTION_DISABLE
|
#define BOOST_EXCEPTION_DISABLE
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
class my_exception: public std::exception { };
|
class my_exception: public std::exception { };
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// http://www.boost.org/LICENSE_1_0.txt
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// http://www.boost.org/LICENSE_1_0.txt
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -22,7 +27,7 @@ void throw_exception( std::exception const &, boost::source_location const & loc
|
|||||||
int r = 0;
|
int r = 0;
|
||||||
|
|
||||||
if( std::strcmp( loc.file_name(), __FILE__ ) != 0 ) ++r;
|
if( std::strcmp( loc.file_name(), __FILE__ ) != 0 ) ++r;
|
||||||
if( loc.line() != 13 ) ++r;
|
if( loc.line() != 18 ) ++r;
|
||||||
|
|
||||||
std::exit( r );
|
std::exit( r );
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,13 @@
|
|||||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
class my_exception: public std::exception { };
|
class my_exception: public std::exception { };
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
class my_exception: public std::exception
|
class my_exception: public std::exception
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
#include <boost/exception_ptr.hpp>
|
#include <boost/exception_ptr.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
class my_exception: public std::exception
|
class my_exception: public std::exception
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
#include <boost/exception/get_error_info.hpp>
|
#include <boost/exception/get_error_info.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(disable: 4702) // unreachable code
|
||||||
|
#endif
|
||||||
|
|
||||||
void test_catch_by_type()
|
void test_catch_by_type()
|
||||||
{
|
{
|
||||||
BOOST_TEST_THROWS( lib1::f(), lib1::exception );
|
BOOST_TEST_THROWS( lib1::f(), lib1::exception );
|
||||||
|
Reference in New Issue
Block a user