Use Boost.Test's minimal test library for unordered & hash. It's closer to

Boster.Test which makes it easier to switch to take advantage of Boost.Test's
extra testing facilities.

Merged revisions 44420 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk

........
  r44420 | danieljames | 2008-04-14 19:02:03 +0100 (Mon, 14 Apr 2008) | 1 line
  
  Use Boost.Test's minimal test library.
........


[SVN r44487]
This commit is contained in:
Daniel James
2008-04-17 07:39:24 +00:00
parent cf529e496a
commit 9cfee57633
23 changed files with 282 additions and 285 deletions

View File

@@ -67,11 +67,11 @@ UNORDERED_AUTO_TEST(single_item_tests)
collide_map x(init.begin(), init.end());
x.erase(x.begin(), x.begin());
BOOST_TEST(x.count(1) == 1 && x.size() == 1);
BOOST_CHECK(x.count(1) == 1 && x.size() == 1);
x.erase(x.end(), x.end());
BOOST_TEST(x.count(1) == 1 && x.size() == 1);
BOOST_CHECK(x.count(1) == 1 && x.size() == 1);
x.erase(x.begin(), x.end());
BOOST_TEST(x.count(1) == 0 && x.size() == 0);
BOOST_CHECK(x.count(1) == 0 && x.size() == 0);
}
UNORDERED_AUTO_TEST(two_equivalent_item_tests)
@@ -83,14 +83,14 @@ UNORDERED_AUTO_TEST(two_equivalent_item_tests)
{
collide_map x(init.begin(), init.end());
x.erase(x.begin(), x.end());
BOOST_TEST(x.count(1) == 0 && x.size() == 0);
BOOST_CHECK(x.count(1) == 0 && x.size() == 0);
}
{
collide_map x(init.begin(), init.end());
int value = boost::next(x.begin())->second;
x.erase(x.begin(), boost::next(x.begin()));
BOOST_TEST(x.count(1) == 1 && x.size() == 1 &&
BOOST_CHECK(x.count(1) == 1 && x.size() == 1 &&
x.begin()->first == 1 && x.begin()->second == value);
}
@@ -98,7 +98,7 @@ UNORDERED_AUTO_TEST(two_equivalent_item_tests)
collide_map x(init.begin(), init.end());
int value = x.begin()->second;
x.erase(boost::next(x.begin()), x.end());
BOOST_TEST(x.count(1) == 1 && x.size() == 1 &&
BOOST_CHECK(x.count(1) == 1 && x.size() == 1 &&
x.begin()->first == 1 && x.begin()->second == value);
}
}