Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / array / test / array6.cpp
index b8bac55..d2cca91 100644 (file)
@@ -10,8 +10,7 @@
 #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 >
@@ -22,38 +21,40 @@ namespace {
         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();
 }