diff --git a/test/Jamfile b/test/Jamfile index 8f1cace5..4cbb600f 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -30,8 +30,7 @@ rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file * : source } test-suite "basics_test" - : - [ test-btl-lib run : class_properties_test : boost_unit_test_framework ] + : [ test-btl-lib run : class_properties_test : boost_unit_test_framework ] [ test-btl-lib run : basic_cstring_test : boost_unit_test_framework ] ; @@ -50,12 +49,12 @@ test-suite "test_exec_monitor_test" ; test-suite "unit_test_framework_test" - : [ test-btl-lib run : errors_handling_test : boost_test_exec_monitor : $(test-dir)/test_files/errors_handling_test.pattern ] + : [ test-btl-lib run : errors_handling_test : boost_unit_test_framework : $(test-dir)/test_files/errors_handling_test.pattern ] [ test-btl-lib run : online_test ] [ test-btl-lib run-fail : minimal_test ] [ test-btl-lib run : foreach_test ] [ test-btl-lib run : output_test_stream_test : boost_unit_test_framework ] - [ test-btl-lib run : result_report_test : boost_test_exec_monitor : $(test-dir)test_files/result_report_test.pattern ] + [ test-btl-lib run : result_report_test : boost_unit_test_framework : $(test-dir)test_files/result_report_test.pattern ] [ test-btl-lib run : parameterized_test_test : boost_unit_test_framework ] [ test-btl-lib run : test_fp_comparisons : boost_unit_test_framework : $(test-dir)test_files/test_fp_comparisons.pattern ] [ test-btl-lib run : test_tools_test : boost_unit_test_framework : $(test-dir)test_files/test_tools_test.pattern ] @@ -63,9 +62,9 @@ test-suite "unit_test_framework_test" [ test-btl-lib run : custom_exception_test : boost_unit_test_framework ] [ test-btl-lib run : fixed_mapping_test : boost_unit_test_framework ] [ test-btl-lib run : ifstream_line_iterator_test : boost_unit_test_framework : $(test-dir)test_files$(SLASH)ifstream_line_iterator.tst1 $(test-dir)test_files$(SLASH)ifstream_line_iterator.tst2 ] - [ test-btl-lib run : algorithms_test : boost_unit_test_framework ] - [ test-btl-lib run : token_iterator_test : boost_unit_test_framework ] - [ test-btl-lib run : boost_check_equal_str : boost_test_exec_monitor ] + [ test-btl-lib run : algorithms_test : boost_unit_test_framework ] + [ test-btl-lib run : token_iterator_test : boost_unit_test_framework ] + [ test-btl-lib run : boost_check_equal_str : boost_unit_test_framework ] # [ compile config_file_iterator_test.cpp ] # [ compile config_file_test.cpp ] diff --git a/test/boost_check_equal_str.cpp b/test/boost_check_equal_str.cpp index 2d6dbb8a..b5bcb0e9 100644 --- a/test/boost_check_equal_str.cpp +++ b/test/boost_check_equal_str.cpp @@ -12,9 +12,10 @@ // Description : basic_cstring unit test // ***************************************************************************** -#include +#define BOOST_TEST_MAIN +#include -int test_main( int, char *[] ) +BOOST_AUTO_TEST_CASE( check_string_compare ) { char const* buf_ptr_cch = "abc"; char const buf_array_cch[] = "abc"; @@ -51,8 +52,6 @@ int test_main( int, char *[] ) BOOST_CHECK_EQUAL(buf_str, buf_ptr_ch); BOOST_CHECK_EQUAL(buf_str, buf_array_ch); BOOST_CHECK_EQUAL(buf_str, buf_str); - - return 0; } // EOF diff --git a/test/errors_handling_test.cpp b/test/errors_handling_test.cpp index b7e6b743..0d7cc2f2 100644 --- a/test/errors_handling_test.cpp +++ b/test/errors_handling_test.cpp @@ -16,7 +16,8 @@ // *************************************************************************** // Boost.Test -#include +#define BOOST_TEST_MAIN +#include #include #include #include @@ -146,13 +147,13 @@ void error_on_demand() //____________________________________________________________________________// -int -test_main( int argc, char * argv[] ) +BOOST_AUTO_TEST_CASE( test_errors_handling ) { #define PATTERN_FILE_NAME "errors_handling_test.pattern" std::string pattern_file_name( - argc <= 1 ? (runtime_config::save_pattern() ? PATTERN_FILE_NAME : "./test_files/" PATTERN_FILE_NAME ) - : argv[1] ); + framework::master_test_suite().argc <= 1 + ? (runtime_config::save_pattern() ? PATTERN_FILE_NAME : "./test_files/" PATTERN_FILE_NAME) + : framework::master_test_suite().argv[1] ); #ifdef LIMITED_TEST pattern_file_name += "2"; @@ -189,9 +190,7 @@ test_main( int argc, char * argv[] ) BOOST_CHECK( test_output.match_pattern() ); } } - - return 0; -} // main +} //____________________________________________________________________________// @@ -199,6 +198,9 @@ test_main( int argc, char * argv[] ) // Revision History : // // $Log$ +// Revision 1.37 2006/02/01 08:00:15 rogeeff +// *** empty log message *** +// // Revision 1.36 2005/12/14 06:01:02 rogeeff // *** empty log message *** // diff --git a/test/online_test.cpp b/test/online_test.cpp index 345a1fd4..731d67c5 100644 --- a/test/online_test.cpp +++ b/test/online_test.cpp @@ -13,12 +13,11 @@ // *************************************************************************** // Boost.Test -#include +#define BOOST_TEST_MAIN +#include -int -test_main( int /*argc*/, char* /*argv*/[] ) +BOOST_AUTO_TEST_CASE( test ) { - return 0; } //____________________________________________________________________________// @@ -27,16 +26,9 @@ test_main( int /*argc*/, char* /*argv*/[] ) // Revision History : // // $Log$ -// Revision 1.14 2005/05/11 05:07:57 rogeeff -// licence update +// Revision 1.15 2006/02/01 08:00:15 rogeeff +// *** empty log message *** // -// Revision 1.13 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.12 2003/12/01 00:42:37 rogeeff -// prerelease cleaning -// - // *************************************************************************** // EOF diff --git a/test/parameterized_test_test.cpp b/test/parameterized_test_test.cpp index 4d41e1bc..089b5757 100644 --- a/test/parameterized_test_test.cpp +++ b/test/parameterized_test_test.cpp @@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE( test_case5 ) ut::test_results const& tr = ut::results_collector.results( test->p_id ); ut::unit_test_log.set_stream( std::cout ); - BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)0 ); + BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)3 ); BOOST_CHECK( !tr.p_aborted ); BOOST_CHECK( !tr.passed() ); } @@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE( test_case6 ) ut::test_results const& tr = ut::results_collector.results( test->p_id ); ut::unit_test_log.set_stream( std::cout ); - BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)2 ); + BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)5 ); BOOST_CHECK( !tr.p_aborted ); } @@ -182,7 +182,7 @@ BOOST_AUTO_TEST_CASE( test_case7 ) ut::test_results const& tr = ut::results_collector.results( test->p_id ); ut::unit_test_log.set_stream( std::cout ); - BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)2 ); + BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)4 ); BOOST_CHECK( !tr.p_aborted ); } @@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE( test_case8 ) ut::test_results const& tr = ut::results_collector.results( test->p_id ); ut::unit_test_log.set_stream( std::cout ); - BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)1 ); + BOOST_CHECK_EQUAL( tr.p_assertions_failed, (std::size_t)3 ); BOOST_CHECK( !tr.p_aborted ); } @@ -211,6 +211,9 @@ BOOST_AUTO_TEST_CASE( test_case8 ) // Revision History : // // $Log$ +// Revision 1.22 2006/02/01 08:00:15 rogeeff +// *** empty log message *** +// // Revision 1.21 2005/12/14 06:01:02 rogeeff // *** empty log message *** // diff --git a/test/result_report_test.cpp b/test/result_report_test.cpp index 43e34a71..71d1e1c3 100644 --- a/test/result_report_test.cpp +++ b/test/result_report_test.cpp @@ -14,7 +14,8 @@ // *************************************************************************** // Boost.Test -#include +#define BOOST_TEST_MAIN +#include #include #include #include @@ -101,16 +102,16 @@ struct guard { //____________________________________________________________________________// -int -test_main( int argc, char* argv[] ) +BOOST_AUTO_TEST_CASE( test_result_reports ) { guard G; #define PATTERN_FILE_NAME "result_report_test.pattern" std::string pattern_file_name( - argc == 1 ? (runtime_config::save_pattern() ? PATTERN_FILE_NAME : "./test_files/" PATTERN_FILE_NAME ) - : argv[1] ); + framework::master_test_suite().argc == 1 + ? (runtime_config::save_pattern() ? PATTERN_FILE_NAME : "./test_files/" PATTERN_FILE_NAME ) + : framework::master_test_suite().argv[1] ); output_test_stream test_output( pattern_file_name, !runtime_config::save_pattern() ); results_reporter::set_stream( test_output ); @@ -159,8 +160,6 @@ test_main( int argc, char* argv[] ) check( test_output, ts_main->p_id ); results_reporter::set_stream( std::cout ); - - return 0; } //____________________________________________________________________________// @@ -169,6 +168,9 @@ test_main( int argc, char* argv[] ) // Revision History : // // $Log$ +// Revision 1.24 2006/02/01 08:00:15 rogeeff +// *** empty log message *** +// // Revision 1.23 2005/12/14 06:01:02 rogeeff // *** empty log message *** // diff --git a/test/test_files/errors_handling_test.pattern b/test/test_files/errors_handling_test.pattern index fcbd1b53..28d5cfcb 100644 --- a/test/test_files/errors_handling_test.pattern +++ b/test/test_files/errors_handling_test.pattern @@ -4,7 +4,6 @@ log level: log_successful_tests; error type: no error; Entering test case "error_on_demand" 98: info: check 'no error' passed -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -12,7 +11,6 @@ log level: log_successful_tests; error type: user message; Entering test case "error_on_demand" message -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -20,7 +18,6 @@ log level: log_successful_tests; error type: user warning; Entering test case "error_on_demand" 106: warning in "error_on_demand": warning -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -28,7 +25,6 @@ log level: log_successful_tests; error type: user non-fatal error; Entering test case "error_on_demand" 110: error in "error_on_demand": non-fatal error -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -37,7 +33,6 @@ log level: log_successful_tests; error type: cpp exception; Entering test case "error_on_demand" 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message 120: last checkpoint: error_on_demand() throw runtime_error -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -46,7 +41,6 @@ log level: log_successful_tests; error type: system error; Entering test case "error_on_demand" 0: fatal error in "error_on_demand": integer divide by zero 125: last checkpoint: error_on_demand() divide by zero -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -54,7 +48,6 @@ log level: log_successful_tests; error type: user fatal error; Entering test case "error_on_demand" 114: fatal error in "error_on_demand": fatal error -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -64,7 +57,6 @@ Entering test case "error_on_demand" 0: fatal error in "error_on_demand": memory access violation 130: last checkpoint: write to an invalid address Test is aborted -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== diff --git a/test/test_files/errors_handling_test.pattern2 b/test/test_files/errors_handling_test.pattern2 index ab31b482..e0c46f0e 100755 --- a/test/test_files/errors_handling_test.pattern2 +++ b/test/test_files/errors_handling_test.pattern2 @@ -4,7 +4,6 @@ log level: log_successful_tests; error type: no error; Entering test case "error_on_demand" 98: info: check 'no error' passed -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -12,7 +11,6 @@ log level: log_successful_tests; error type: user message; Entering test case "error_on_demand" message -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -20,7 +18,6 @@ log level: log_successful_tests; error type: user warning; Entering test case "error_on_demand" 106: warning in "error_on_demand": warning -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -28,7 +25,6 @@ log level: log_successful_tests; error type: user non-fatal error; Entering test case "error_on_demand" 110: error in "error_on_demand": non-fatal error -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -37,7 +33,6 @@ log level: log_successful_tests; error type: cpp exception; Entering test case "error_on_demand" 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message 120: last checkpoint: error_on_demand() throw runtime_error -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -45,7 +40,6 @@ log level: log_successful_tests; error type: system error; Entering test case "error_on_demand" 114: fatal error in "error_on_demand": fatal error -202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" ===========================