#include <boost/array.hpp>
#include <algorithm>
-#define BOOST_TEST_MAIN
-#include <boost/test/unit_test.hpp>
+#include <boost/core/lightweight_test_trait.hpp>
namespace {
template< class T >
test_type test_case; // = { 1, 1, 2, 3, 5 };
arr &aRef = get_c_array ( test_case );
- BOOST_CHECK ( &*test_case.begin () == &aRef[0] );
+ BOOST_TEST ( &*test_case.begin () == &aRef[0] );
const arr &caRef = get_c_array ( test_case );
typename test_type::const_iterator iter = test_case.begin ();
- BOOST_CHECK ( &*iter == &caRef[0] );
+ BOOST_TEST ( &*iter == &caRef[0] );
// Confirm at() throws the std lib defined exception
try {
test_case.at( test_case.size());
- BOOST_CHECK(false);
+ BOOST_TEST(false);
}
catch ( const std::out_of_range & ) {}
try {
test_case.at( test_case.size() + 1);
- BOOST_CHECK(false);
+ BOOST_TEST(false);
}
catch ( const std::out_of_range & ) {}
try {
test_case.at( test_case.size() + 100);
- BOOST_CHECK(false);
+ BOOST_TEST(false);
}
catch ( const std::out_of_range & ) {}
}
}
-BOOST_AUTO_TEST_CASE( test_main )
+int main ()
{
RunTests< bool >();
RunTests< void * >();
RunTests< long double >();
RunTests< std::string >();
+
+ return boost::report_errors();
}