From 65fc893eaaf1daace7b70d3c39e6157ca62e81fd Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 17 Jan 2023 03:14:06 +0200 Subject: [PATCH] Update stream_state_test.cpp --- test/stream_state_test.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/stream_state_test.cpp b/test/stream_state_test.cpp index 3fa5466e0..7b600b199 100644 --- a/test/stream_state_test.cpp +++ b/test/stream_state_test.cpp @@ -164,7 +164,7 @@ test_suite* init_unit_test_suite(int, char* []) test->add(BOOST_TEST_CASE(&wrap_throw_delayed<&test_write>::execute)); #endif -// MSSTL and libc++ don't handle exceptions from seek correctly +// MSSTL and libc++ don't handle exceptions from seekg correctly #if !defined(_CPPLIB_VER) && !defined(_LIBCPP_VERSION) test->add(BOOST_TEST_CASE(&wrap_nothrow <&test_seekg>::execute)); @@ -172,14 +172,19 @@ test_suite* init_unit_test_suite(int, char* []) #ifndef __CYGWIN__ test->add(BOOST_TEST_CASE(&wrap_throw_delayed<&test_seekg>::execute)); #endif - + +#endif // !defined(_CPPLIB_VER) && !defined(_LIBCPP_VERSION) + +// Since C++11, seekp does not catch exceptions +#if 0 + test->add(BOOST_TEST_CASE(&wrap_nothrow <&test_seekp>::execute)); test->add(BOOST_TEST_CASE(&wrap_throw <&test_seekp>::execute)); #ifndef __CYGWIN__ test->add(BOOST_TEST_CASE(&wrap_throw_delayed<&test_seekp>::execute)); #endif -#endif // !defined(_CPPLIB_VER) && !defined(_LIBCPP_VERSION) +#endif return test; }