diff --git a/test/contains_test.cpp b/test/contains_test.cpp index fa11559..91e10ab 100644 --- a/test/contains_test.cpp +++ b/test/contains_test.cpp @@ -5,10 +5,12 @@ // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#include #include +#include #include +#define BOOST_CHECK BOOST_TEST + static int forty_two() { return 42; } struct Seventeen @@ -225,11 +227,11 @@ static void ref_equal_test() #endif } -int test_main(int, char*[]) +int main() { target_test(); equal_test(); ref_equal_test(); - return 0; + return boost::report_errors(); } diff --git a/test/function_n_test.cpp b/test/function_n_test.cpp index 9b0717f..418c46f 100644 --- a/test/function_n_test.cpp +++ b/test/function_n_test.cpp @@ -7,12 +7,14 @@ // For more information, see http://www.boost.org -#include #include +#include #include #include #include +#define BOOST_CHECK BOOST_TEST + using namespace boost; using std::string; using std::negate; @@ -684,7 +686,7 @@ void test_construct_destroy_count() BOOST_CHECK(construction_count == destruction_count); } -int test_main(int, char* []) +int main() { test_zero_args(); test_one_arg(); @@ -693,5 +695,5 @@ int test_main(int, char* []) test_member_functions(); test_ref(); test_construct_destroy_count(); - return 0; + return boost::report_errors(); } diff --git a/test/function_test.cpp b/test/function_test.cpp index 6e99d53..88747e0 100644 --- a/test/function_test.cpp +++ b/test/function_test.cpp @@ -7,12 +7,14 @@ // For more information, see http://www.boost.org -#include #include +#include #include #include #include +#define BOOST_CHECK BOOST_TEST + using boost::function; using std::string; @@ -792,7 +794,7 @@ static void test_move_semantics() #endif } -int test_main(int, char* []) +int main() { test_zero_args(); test_one_arg(); @@ -807,5 +809,5 @@ int test_main(int, char* []) test_move_semantics >(); test_move_semantics >(); - return 0; + return boost::report_errors(); } diff --git a/test/function_test_fail1.cpp b/test/function_test_fail1.cpp index 99c599c..0b84cc7 100644 --- a/test/function_test_fail1.cpp +++ b/test/function_test_fail1.cpp @@ -7,22 +7,12 @@ // For more information, see http://www.boost.org -#include #include -using namespace std; -using namespace boost; - -int -test_main(int, char*[]) +void test() { - function0 f1; - function0 f2; + boost::function0 f1; + boost::function0 f2; - if (f1 == f2) { - } - - BOOST_ERROR("This should not have compiled."); - - return 0; + if( f1 == f2 ) {} } diff --git a/test/function_test_fail2.cpp b/test/function_test_fail2.cpp index 57f2d22..d113e45 100644 --- a/test/function_test_fail2.cpp +++ b/test/function_test_fail2.cpp @@ -7,21 +7,12 @@ // For more information, see http://www.boost.org -#include #include -using namespace std; -using namespace boost; - static int bad_fn(float f) { return static_cast(f); } -int -test_main(int, char*[]) +void test() { - function0 f1; - f1 = bad_fn; - - BOOST_ERROR("This should not have compiled."); - - return 0; + boost::function0 f1; + f1 = bad_fn; } diff --git a/test/nothrow_swap.cpp b/test/nothrow_swap.cpp index 0a5b740..8b1b6dc 100644 --- a/test/nothrow_swap.cpp +++ b/test/nothrow_swap.cpp @@ -7,8 +7,10 @@ // For more information, see http://www.boost.org -#include #include +#include + +#define BOOST_CHECK BOOST_TEST struct tried_to_copy { }; @@ -40,7 +42,7 @@ struct MaybeThrowOnCopy { bool MaybeThrowOnCopy::throwOnCopy = false; -int test_main(int, char* []) +int main() { boost::function0 f; boost::function0 g; @@ -56,5 +58,5 @@ int test_main(int, char* []) BOOST_CHECK(f() == 2); BOOST_CHECK(g() == 1); - return 0; + return boost::report_errors(); } diff --git a/test/rvalues_test.cpp b/test/rvalues_test.cpp index 977f4ba..28545d5 100644 --- a/test/rvalues_test.cpp +++ b/test/rvalues_test.cpp @@ -6,12 +6,13 @@ // For more information, see http://www.boost.org +#include +#include +#include #include #include -#include -#include -#include +#define BOOST_CHECK BOOST_TEST class only_movable { private: @@ -63,7 +64,7 @@ int three(std::string&&) { return 1; } std::string&& four(std::string&& s) { return boost::move(s); } #endif -int test_main(int, char*[]) +int main() { using boost::function; @@ -102,5 +103,5 @@ int test_main(int, char*[]) BOOST_CHECK(f4(std::string("world")) == "world"); #endif - return 0; + return boost::report_errors(); }