Check that exceptions thrown when swapping meet the exception requirements.

[SVN r3620]
This commit is contained in:
Daniel James
2007-01-10 00:06:55 +00:00
parent add94f8385
commit f979c07d2e

View File

@ -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);
}