99#include < iostream>
1010#include < boost/array.hpp>
1111
12- #define BOOST_TEST_MAIN
13- #include < boost/test/unit_test.hpp>
12+ #include < boost/core/lightweight_test_trait.hpp>
1413
1514namespace {
1615
1716template < class T >
1817void BadValue ( const T & )
1918{
20- BOOST_CHECK ( false );
19+ BOOST_TEST ( false );
2120}
2221
2322template < class T >
@@ -33,19 +32,19 @@ void RunTests()
3332
3433 // front/back and operator[] must compile, but calling them is undefined
3534 // Likewise, all tests below should evaluate to false, avoiding undefined behaviour
36- BOOST_CHECK ( test_case.empty ());
37- BOOST_CHECK ( const_test_case.empty ());
35+ BOOST_TEST ( test_case.empty ());
36+ BOOST_TEST ( const_test_case.empty ());
3837
39- BOOST_CHECK ( test_case.size () == 0 );
40- BOOST_CHECK ( const_test_case.size () == 0 );
38+ BOOST_TEST ( test_case.size () == 0 );
39+ BOOST_TEST ( const_test_case.size () == 0 );
4140
4241 // Assert requirements of TR1 6.2.2.4
43- BOOST_CHECK ( test_case.begin () == test_case.end ());
44- BOOST_CHECK ( test_case.cbegin () == test_case.cend ());
45- BOOST_CHECK ( const_test_case.begin () == const_test_case.end ());
46- BOOST_CHECK ( const_test_case.cbegin () == const_test_case.cend ());
42+ BOOST_TEST ( test_case.begin () == test_case.end ());
43+ BOOST_TEST ( test_case.cbegin () == test_case.cend ());
44+ BOOST_TEST ( const_test_case.begin () == const_test_case.end ());
45+ BOOST_TEST ( const_test_case.cbegin () == const_test_case.cend ());
4746
48- BOOST_CHECK ( test_case.begin () != const_test_case.begin () );
47+ BOOST_TEST ( test_case.begin () != const_test_case.begin () );
4948 if ( test_case.data () == const_test_case.data () ) {
5049 // Value of data is unspecified in TR1, so no requirement this test pass or fail
5150 // However, it must compile!
@@ -79,11 +78,12 @@ void RunTests()
7978
8079}
8180
82- BOOST_AUTO_TEST_CASE ( test_main )
81+ int main ( )
8382{
8483 RunTests< bool >();
8584 RunTests< void * >();
8685 RunTests< long double >();
8786 RunTests< std::string >();
88- }
8987
88+ return boost::report_errors ();
89+ }
0 commit comments