From f979c07d2e212fe3b39418676bcb42602e3ae026 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 10 Jan 2007 00:06:55 +0000 Subject: [PATCH] Check that exceptions thrown when swapping meet the exception requirements. [SVN r3620] --- test/exception/swap_tests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/exception/swap_tests.cpp b/test/exception/swap_tests.cpp index 5fe64763..2cc0f381 100644 --- a/test/exception/swap_tests.cpp +++ b/test/exception/swap_tests.cpp @@ -72,6 +72,16 @@ struct swap_base : public test::exception_base } catch (std::runtime_error) {} } void check(data_type const& d) const { + std::string scope(test::scope); + +#if BOOST_UNORDERED_SWAP_METHOD != 2 + HASH_CHECK( + scope == "hash::operator(hash)" || + scope == "hash::operator=(hash)" || + scope == "equal_to::operator(equal_to)" || + scope == "equal_to::operator=(equal_to)"); +#endif + test::check_equivalent_keys(d.x); test::check_equivalent_keys(d.y); }