No need to test things not related to zip_iterator

[SVN r22012]
This commit is contained in:
Dave Abrahams
2004-01-27 21:24:20 +00:00
parent 0670e05297
commit 0cb4ce54ef

View File

@ -82,86 +82,6 @@ int main( void )
size_t num_successful_tests = 0;
size_t num_failed_tests = 0;
/////////////////////////////////////////////////////////////////////////////
//
// Make sure tuples are supported
//
/////////////////////////////////////////////////////////////////////////////
std::cout << "Basic tuple support: "
<< std::flush;
typedef boost::tuples::tuple<int, double> mytuple;
mytuple t1;
boost::tuples::get<0>(t1) = 42;
boost::tuples::get<1>(t1) = 42.1;
if( 2 == boost::tuples::length<mytuple>::value &&
42 == boost::tuples::get<0>(t1) &&
42.1 == boost::tuples::get<1>(t1)
)
{
++num_successful_tests;
std::cout << "OK" << std::endl;
}
else
{
++num_failed_tests = 0;
std::cout << "not OK" << std::endl;
}
/////////////////////////////////////////////////////////////////////////////
//
// Make sure iterator adaptor is supported
//
/////////////////////////////////////////////////////////////////////////////
std::cout << "Basic iterator adaptor support: "
<< std::flush;
std::set<int> s;
s.insert(42);
s.insert(43);
s.insert(44);
typedef boost::transform_iterator<
std::binder1st<std::plus<int> >,
std::set<int>::iterator
>
add_seven_iterator;
typedef boost::transform_iterator<
std::binder1st<std::plus<int> >,
std::set<int>::const_iterator
>
const_add_seven_iterator;
add_seven_iterator set_run(s.begin(), std::bind1st(std::plus<int>(), 7));
add_seven_iterator set_end(s.end(), std::bind1st(std::plus<int>(), 7));
const_add_seven_iterator const_set_run(s.begin(), std::bind1st(std::plus<int>(), 7));
// set_run = const_set_run; // Error: can't convert from const to non-const
const_set_run = set_run;
if( 49 == *set_run &&
50 == *++set_run &&
51 == *++set_run &&
set_end == ++set_run &&
49 == *const_set_run &&
50 == *++const_set_run &&
51 == *++const_set_run &&
set_end == ++const_set_run
)
{
++num_successful_tests;
std::cout << "OK" << std::endl;
}
else
{
++num_failed_tests = 0;
std::cout << "not OK" << std::endl;
}
/////////////////////////////////////////////////////////////////////////////
//
// Zip iterator construction and dereferencing