#include <boost/config.hpp>
#include <boost/algorithm/cxx11/iota.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
#include <iostream>
#include <string>
std::vector<int> v;
std::list<int> l;
- v.clear (); v.reserve ( 10 );
+ v.clear (); v.resize ( 10 );
boost::algorithm::iota ( v.begin (), v.end (), 23 );
BOOST_CHECK ( test_iota_results ( v.begin (), v.end (), 23 ));
- v.clear (); v.reserve ( 19 );
+ v.clear (); v.resize ( 19 );
boost::algorithm::iota ( v, 18 );
BOOST_CHECK ( test_iota_results ( v, 18 ));
boost::algorithm::iota_n ( std::back_inserter(v), 99, 20 );
BOOST_CHECK ( test_iota_results ( v, 99 ));
+ v.clear ();
+ boost::algorithm::iota_n ( std::back_inserter(v), 99, 0 );
+ BOOST_CHECK ( v.size() == 0 );
+
/*
l.clear (); l.reserve ( 5 );
boost::algorithm::iota ( l.begin (), l.end (), 123 );
}
-int test_main( int , char* [] )
+BOOST_AUTO_TEST_CASE( test_main )
{
test_ints ();
- return 0;
}