Change the hash tests to use the lightweight test header.

[SVN r32784]
This commit is contained in:
Daniel James
2006-02-09 19:16:08 +00:00
parent 514757c312
commit 4bee159a10
23 changed files with 412 additions and 273 deletions
+5 -5
View File
@@ -37,17 +37,17 @@ namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests)
HASH_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
BOOST_CHECK(hasher(containers[i2]) == hasher(containers[i2]));
BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
BOOST_CHECK(hasher(containers[i2]) ==
BOOST_TEST(hasher(containers[i2]) ==
HASH_NAMESPACE::hash_value(containers[i2]));
BOOST_CHECK(hasher(containers[i2])
BOOST_TEST(hasher(containers[i2])
== HASH_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
BOOST_CHECK(
BOOST_TEST(
(containers[i2] == containers[j2]) ==
(hasher(containers[i2]) == hasher(containers[j2]))
);
@@ -55,7 +55,7 @@ namespace BOOST_PP_CAT(CONTAINER_TYPE, _tests)
}
}
BOOST_AUTO_TEST_CASE(BOOST_PP_CAT(CONTAINER_TYPE, _hash_integer_tests))
void BOOST_PP_CAT(CONTAINER_TYPE, _hash_integer_tests())
{
integer_tests((CONTAINER_TYPE<char>*) 0);
integer_tests((CONTAINER_TYPE<int>*) 0);