diff options
Diffstat (limited to 'src/boost/libs/exception/test/visibility_test.cpp')
-rw-r--r-- | src/boost/libs/exception/test/visibility_test.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/boost/libs/exception/test/visibility_test.cpp b/src/boost/libs/exception/test/visibility_test.cpp new file mode 100644 index 000000000..362c63bbc --- /dev/null +++ b/src/boost/libs/exception/test/visibility_test.cpp @@ -0,0 +1,32 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//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) + +#include <boost/config.hpp> + +#if defined( BOOST_NO_EXCEPTIONS ) +# error This program requires exception handling. +#endif + +#include "visibility_test_lib.hpp" +#include <boost/exception/get_error_info.hpp> +#include <boost/detail/lightweight_test.hpp> + +void BOOST_SYMBOL_IMPORT hidden_throw(); + +int +main() + { + try + { + hidden_throw(); + BOOST_TEST(false); + } + catch( + my_exception & e ) + { + BOOST_TEST(boost::get_error_info<my_info>(e) && *boost::get_error_info<my_info>(e)==42); + } + return boost::report_errors(); + } |