forked from boostorg/regex
replaced BOOST_TEST
[SVN r27053]
This commit is contained in:
@ -37,14 +37,14 @@ void test_captures(const std::string& regx, const std::string& text, T& expected
|
|||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
#ifndef __sgi
|
#ifndef __sgi
|
||||||
// strange type deduction causes this test to fail on SGI:
|
// strange type deduction causes this test to fail on SGI:
|
||||||
BOOST_TEST(what.size() == ARRAY_SIZE(expected));
|
BOOST_CHECK(what.size() == ARRAY_SIZE(expected));
|
||||||
#endif
|
#endif
|
||||||
for(i = 0; i < what.size(); ++i)
|
for(i = 0; i < what.size(); ++i)
|
||||||
{
|
{
|
||||||
BOOST_TEST(what.captures(i).size() <= ARRAY_SIZE(expected[i]));
|
BOOST_CHECK(what.captures(i).size() <= ARRAY_SIZE(expected[i]));
|
||||||
for(j = 0; j < what.captures(i).size(); ++j)
|
for(j = 0; j < what.captures(i).size(); ++j)
|
||||||
{
|
{
|
||||||
BOOST_TEST(what.captures(i)[j] == expected[i][j]);
|
BOOST_CHECK(what.captures(i)[j] == expected[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,13 +49,13 @@ int test_main(int /*argc*/, char * /*argv*/[])
|
|||||||
for(i = 0; i < 20; ++i)
|
for(i = 0; i < 20; ++i)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
boost::shared_ptr<test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||||
BOOST_TEST(p->value() == i);
|
BOOST_CHECK(p->value() == i);
|
||||||
p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||||
BOOST_TEST(p->value() == i);
|
BOOST_CHECK(p->value() == i);
|
||||||
if(i)
|
if(i)
|
||||||
{
|
{
|
||||||
p = boost::object_cache<int, test_object>::get(i-1, max_cache_size);
|
p = boost::object_cache<int, test_object>::get(i-1, max_cache_size);
|
||||||
BOOST_TEST(p->value() == i-1);
|
BOOST_CHECK(p->value() == i-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int current_count = test_object::count();
|
int current_count = test_object::count();
|
||||||
@ -64,12 +64,12 @@ int test_main(int /*argc*/, char * /*argv*/[])
|
|||||||
for(i = 20 - max_cache_size; i < 20; ++i)
|
for(i = 20 - max_cache_size; i < 20; ++i)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
boost::shared_ptr<test_object> p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||||
BOOST_TEST(p->value() == i);
|
BOOST_CHECK(p->value() == i);
|
||||||
p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
p = boost::object_cache<int, test_object>::get(i, max_cache_size);
|
||||||
BOOST_TEST(p->value() == i);
|
BOOST_CHECK(p->value() == i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BOOST_TEST(current_count == test_object::count());
|
BOOST_CHECK(current_count == test_object::count());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user