diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp index 0217506c..5264390e 100644 --- a/include/boost/test/impl/execution_monitor.ipp +++ b/include/boost/test/impl/execution_monitor.ipp @@ -230,8 +230,6 @@ execution_monitor::execute( unit_test::callback0 const& F, bool catch_syste // required. Programmers ask for const anyhow, so we supply it. That's // easier than answering questions about non-const usage. - catch( execution_aborted const& ) - { return 0; } catch( char const* ex ) { detail::report_error( execution_exception::cpp_exception_error, "C string: ", ex ); } catch( std::string const& ex ) @@ -285,7 +283,11 @@ execution_monitor::execute( unit_test::callback0 const& F, bool catch_syste { detail::report_error( ex.error_code(), ex.error_message() ); } #endif // BOOST_SIGACTION_BASED_SIGNAL_HANDLING - catch( execution_exception const& ) { throw; } + catch( execution_aborted const& ) + { return 0; } + + catch( execution_exception const& ) + { throw; } catch( ... ) { detail::report_error( execution_exception::cpp_exception_error, "unknown type" ); } @@ -338,7 +340,7 @@ private: bool m_set_timeout; }; -signal_handler* signal_handler::s_active_handler = NULL; //!! need to be placed in thread specific storage +signal_handler* signal_handler::s_active_handler = NULL; // !! need to be placed in thread specific storage //____________________________________________________________________________// @@ -640,6 +642,9 @@ detect_memory_leak( long mem_leak_alloc_num ) // Revision History : // // $Log$ +// Revision 1.10 2005/12/14 05:52:49 rogeeff +// *** empty log message *** +// // Revision 1.9 2005/04/30 17:07:22 rogeeff // ignore_warning included // diff --git a/include/boost/test/impl/progress_monitor.ipp b/include/boost/test/impl/progress_monitor.ipp index b11d7212..57becf34 100644 --- a/include/boost/test/impl/progress_monitor.ipp +++ b/include/boost/test/impl/progress_monitor.ipp @@ -17,7 +17,7 @@ // Boost.Test #include -#include +#include // Boost #include @@ -109,6 +109,9 @@ progress_monitor_t::set_stream( std::ostream& ostr ) // Revision History : // // $Log$ +// Revision 1.2 2005/12/14 05:52:49 rogeeff +// *** empty log message *** +// // Revision 1.1 2005/02/20 08:27:07 rogeeff // This a major update for Boost.Test framework. See release docs for complete list of fixes/updates // diff --git a/include/boost/test/impl/results_reporter.ipp b/include/boost/test/impl/results_reporter.ipp index b38d7a1d..97cff927 100644 --- a/include/boost/test/impl/results_reporter.ipp +++ b/include/boost/test/impl/results_reporter.ipp @@ -17,7 +17,7 @@ // Boost.Test #include -#include +#include #include #include #include @@ -191,6 +191,9 @@ make_report( report_level l, test_unit_id id ) // Revision History : // // $Log$ +// Revision 1.5 2005/12/14 05:57:32 rogeeff +// *** empty log message *** +// // Revision 1.4 2005/04/30 16:48:51 rogeeff // io saver warkaround for classic io is shared // diff --git a/include/boost/test/impl/unit_test_suite.ipp b/include/boost/test/impl/unit_test_suite.ipp index 14b2691d..d7751c42 100644 --- a/include/boost/test/impl/unit_test_suite.ipp +++ b/include/boost/test/impl/unit_test_suite.ipp @@ -18,7 +18,7 @@ // Boost.Test #include -#include +#include #include #include #include @@ -130,6 +130,7 @@ test_suite::add( test_unit* tu, counter_t expected_failures, unsigned timeout ) tu->p_timeout.value = timeout; m_members.push_back( tu->p_id ); + tu->p_parent_id.value = p_id; } //____________________________________________________________________________// @@ -156,7 +157,8 @@ traverse_test_tree( test_case const& tc, test_tree_visitor& V ) //____________________________________________________________________________// -void traverse_test_tree( test_suite const& suite, test_tree_visitor& V ) +void +traverse_test_tree( test_suite const& suite, test_tree_visitor& V ) { if( !V.test_suite_start( suite ) ) return; @@ -168,18 +170,14 @@ void traverse_test_tree( test_suite const& suite, test_tree_visitor& V ) } else { std::vector members( suite.m_members ); -//#if !defined(__BORLANDC__) || !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) std::random_shuffle( members.begin(), members.end() ); -//#else -// bool random_test_order_not_supported_on_borland = false; -// assert(random_test_order_not_supported_on_borland); -//#endif BOOST_TEST_FOREACH( test_unit_id, id, members ) traverse_test_tree( id, V ); } - } catch( test_aborted const& ) { + } catch( test_being_aborted const& ) { V.test_suite_finish( suite ); + framework::test_unit_aborted( suite ); throw; } @@ -230,6 +228,9 @@ normalize_test_case_name( const_string name ) // Revision History : // // $Log$ +// Revision 1.11 2005/12/14 05:54:41 rogeeff +// *** empty log message *** +// // Revision 1.10 2005/04/18 04:55:36 rogeeff // test unit name made read/write // diff --git a/test/Jamfile b/test/Jamfile index dba8f9d5..8f1cace5 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -21,16 +21,17 @@ rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file * : source return [ $(test-rule) $(source_files) ../build/$(lib-name) : #args - : $(pattern_file) - : on <*>-w-8080 - BOOST_TEST_NO_AUTO_LINK=1 # requirements + : #input files + $(pattern_file) + : # requirements + on <*>-w-8080 : $(test-name) ] ; } 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 ] ; @@ -55,12 +56,10 @@ test-suite "unit_test_framework_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 : parameterized_test_test : boost_test_exec_monitor ] + [ 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 ] - [ test-btl-lib run : auto_unit_test_test : boost_unit_test_framework ] - [ test-btl-lib run : auto_unit_test_test_mult : boost_unit_test_framework : : auto_unit_test_test_mult1.cpp auto_unit_test_test_mult2.cpp ] - [ test-btl-lib run : test_case_template_test : boost_test_exec_monitor ] + [ test-btl-lib run : test_case_template_test : boost_unit_test_framework ] [ 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 ] diff --git a/test/auto-link-test/.cvsignore b/test/auto-link-test/.cvsignore new file mode 100644 index 00000000..1b1161b0 --- /dev/null +++ b/test/auto-link-test/.cvsignore @@ -0,0 +1 @@ +res \ No newline at end of file diff --git a/test/auto-link-test/Jamfile b/test/auto-link-test/Jamfile new file mode 100644 index 00000000..b2e3e9aa --- /dev/null +++ b/test/auto-link-test/Jamfile @@ -0,0 +1,46 @@ +# (C) Copyright Gennadiy Rozental 2001-2005. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt) +# +# See http://www.boost.org/libs/test for the library home page. + +subproject libs/test/test/auto-link-test ; + +# bring in the rules for testing +import testing ; + +run + ../auto_non_auto_mix_test.cpp + : # args + : # input files + : # requirements + ../../../../stage/lib + BOOST_LIB_DIAGNOSTIC=1 + : # program name + auto_non_auto_mix_test + ; + + +run + ../boost_check_equal_str.cpp + : # args + : # input files + : # requirements + ../../../../stage/lib + BOOST_LIB_DIAGNOSTIC=1 + : # program name + boost_check_equal_str + ; + + +run-fail + ../prg_exec_fail1.cpp + : # args + : # input files + : # requirements + ../../../../stage/lib + BOOST_LIB_DIAGNOSTIC=1 + : # program name + prg_exec_fail1 + ; + diff --git a/test/auto-link-test/run_bjam.bat b/test/auto-link-test/run_bjam.bat new file mode 100644 index 00000000..fd1fcdeb --- /dev/null +++ b/test/auto-link-test/run_bjam.bat @@ -0,0 +1 @@ +bjam "-sTOOLS=vc-7_1" "-sSTLPORT_VERSION=4.6.2" "-sSTLPORT_ROOT=D:\Source Code\STLport-4.6.2" "-sSTLPORT_PATH=D:\Source Code" "-sVC71_ROOT=C:\Compilers\Microsoft Visual Studio .NET 2003\Vc7" -sBUILD="release debug multi/single static/dynamic" test 2>&1 | tee res diff --git a/test/auto_unit_test_test.cpp b/test/auto_unit_test_test.cpp deleted file mode 100644 index d321c6e7..00000000 --- a/test/auto_unit_test_test.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// (C) Copyright Gennadiy Rozental 2001-2005. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/test for the library home page. -// -// File : $RCSfile$ -// -// Version : $Revision$ -// -// Description : unit test for auto unit test facility -// *************************************************************************** - -// Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include - -BOOST_AUTO_TEST_CASE( test1 ) -{ - BOOST_CHECK( true ); -} - -BOOST_AUTO_TEST_CASE( test2 ) -{ - BOOST_CHECK( true ); -} - -//____________________________________________________________________________// - -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.10 2005/05/11 05:07:56 rogeeff -// licence update -// -// Revision 1.9 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// Revision 1.8 2005/05/27 06:30:48 rogeeff -// no message -// -// Revision 1.7 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.6 2003/12/01 00:42:37 rogeeff -// prerelease cleaning -// -// *************************************************************************** - -// EOF diff --git a/test/auto_unit_test_test_mult1.cpp b/test/auto_unit_test_test_mult1.cpp deleted file mode 100644 index a9530344..00000000 --- a/test/auto_unit_test_test_mult1.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// (C) Copyright Gennadiy Rozental 2001-2005. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/test for the library home page. -// -// File : $RCSfile$ -// -// Version : $Revision$ -// -// Description : test auto unit test facility to work with multiple compilation units -// *************************************************************************** - -// Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include - -BOOST_AUTO_TEST_CASE( test ) -{ - BOOST_CHECK( true ); -} - -//____________________________________________________________________________// - -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.7 2005/05/11 05:07:56 rogeeff -// licence update -// -// Revision 1.6 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// Revision 1.5 2005/05/27 06:30:48 rogeeff -// no message -// -// Revision 1.4 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.3 2003/12/01 00:42:37 rogeeff -// prerelease cleaning -// -// *************************************************************************** - -// EOF diff --git a/test/auto_unit_test_test_mult2.cpp b/test/auto_unit_test_test_mult2.cpp deleted file mode 100644 index 6c9ce355..00000000 --- a/test/auto_unit_test_test_mult2.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// (C) Copyright Gennadiy Rozental 2001-2005. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/test for the library home page. -// -// File : $RCSfile$ -// -// Version : $Revision$ -// -// Description : test auto unit test facility to work with multiple compilation units -// *************************************************************************** - -// Boost.Test -#include - -BOOST_AUTO_TEST_CASE( test ) -{ - BOOST_CHECK( true ); -} - -//____________________________________________________________________________// - -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.7 2005/05/11 05:07:56 rogeeff -// licence update -// -// Revision 1.6 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// Revision 1.5 2005/05/27 06:30:48 rogeeff -// no message -// -// Revision 1.4 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.3 2003/12/01 00:42:37 rogeeff -// prerelease cleaning -// -// *************************************************************************** - -// EOF diff --git a/test/boost_check_equal_str.cpp b/test/boost_check_equal_str.cpp index ec197b18..2d6dbb8a 100644 --- a/test/boost_check_equal_str.cpp +++ b/test/boost_check_equal_str.cpp @@ -12,7 +12,7 @@ // Description : basic_cstring unit test // ***************************************************************************** -#include +#include int test_main( int, char *[] ) { diff --git a/test/config_file_iterator_test.cpp b/test/config_file_iterator_test.cpp index cd41b4ce..0031fe99 100755 --- a/test/config_file_iterator_test.cpp +++ b/test/config_file_iterator_test.cpp @@ -13,8 +13,8 @@ // ***************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include namespace utf = boost::unit_test; // Boost.Runtime.Parameter @@ -315,6 +315,9 @@ BOOST_AUTO_TEST_CASE( test_ifdef ) // History : // // $Log$ +// Revision 1.3 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.2 2005/05/11 05:07:56 rogeeff // licence update // diff --git a/test/config_file_test.cpp b/test/config_file_test.cpp index 42d0f375..4a27a91a 100755 --- a/test/config_file_test.cpp +++ b/test/config_file_test.cpp @@ -13,8 +13,8 @@ // ***************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include namespace utf = boost::unit_test; // Boost.Runtime.Parameter @@ -258,6 +258,9 @@ test_multipart_value() // History : // // $Log$ +// Revision 1.4 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.3 2005/05/11 05:07:56 rogeeff // licence update // diff --git a/test/custom_exception_test.cpp b/test/custom_exception_test.cpp index 2048383d..21807150 100644 --- a/test/custom_exception_test.cpp +++ b/test/custom_exception_test.cpp @@ -42,7 +42,7 @@ void throw_my_exception1() void my_exception1_translator( my_exception1 ) { - BOOST_MESSAGE( "Caught my_exception1" ); + BOOST_TEST_MESSAGE( "Caught my_exception1" ); } //____________________________________________________________________________// @@ -54,7 +54,7 @@ void throw_my_exception2() void my_exception2_translator( my_exception2 ) { - BOOST_MESSAGE( "Caught my_exception2" ); + BOOST_TEST_MESSAGE( "Caught my_exception2" ); } //____________________________________________________________________________// @@ -78,6 +78,9 @@ init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { // Revision History : // // $Log$ +// Revision 1.8 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.7 2005/05/11 05:07:56 rogeeff // licence update // diff --git a/test/errors_handling_test.cpp b/test/errors_handling_test.cpp index 74b5b3ca..b7e6b743 100644 --- a/test/errors_handling_test.cpp +++ b/test/errors_handling_test.cpp @@ -16,9 +16,10 @@ // *************************************************************************** // Boost.Test -#include +#include #include #include +#include #include #include #include @@ -98,7 +99,7 @@ void error_on_demand() break; case et_message: - BOOST_MESSAGE( "message" ); + BOOST_TEST_MESSAGE( "message" ); break; case et_warning: @@ -116,17 +117,17 @@ void error_on_demand() break; case et_cpp_exception: - BOOST_CHECKPOINT( "error_on_demand() throw runtime_error" ); + BOOST_TEST_CHECKPOINT( "error_on_demand() throw runtime_error" ); throw std::runtime_error( "test std::runtime error what() message" ); #ifndef LIMITED_TEST case et_system: - BOOST_CHECKPOINT( "error_on_demand() divide by zero" ); + BOOST_TEST_CHECKPOINT( "error_on_demand() divide by zero" ); divide_by_zero = 1 / divide_by_zero; break; case et_fatal_system: - BOOST_CHECKPOINT( "write to an invalid address" ); + BOOST_TEST_CHECKPOINT( "write to an invalid address" ); { int* p = 0; *p = 0; @@ -198,6 +199,9 @@ test_main( int argc, char * argv[] ) // Revision History : // // $Log$ +// Revision 1.36 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.35 2005/06/13 11:46:26 schoepflin // Use limited tests with Tru64/CXX. // diff --git a/test/fixed_mapping_test.cpp b/test/fixed_mapping_test.cpp index f3dede2c..0d71d542 100644 --- a/test/fixed_mapping_test.cpp +++ b/test/fixed_mapping_test.cpp @@ -13,8 +13,8 @@ // ***************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include #include #include @@ -82,6 +82,9 @@ BOOST_AUTO_TEST_CASE( test_custom_compare ) // History : // // $Log$ +// Revision 1.8 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.7 2005/05/11 05:07:56 rogeeff // licence update // diff --git a/test/ifstream_line_iterator_test.cpp b/test/ifstream_line_iterator_test.cpp index ba079252..92aad38d 100644 --- a/test/ifstream_line_iterator_test.cpp +++ b/test/ifstream_line_iterator_test.cpp @@ -13,22 +13,22 @@ // ***************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include #include -namespace utf = boost::unit_test; +namespace ut = boost::unit_test; -static utf::ifstream_line_iterator eoi; +static ut::ifstream_line_iterator eoi; //____________________________________________________________________________// BOOST_AUTO_TEST_CASE( test_default_delimeter ) { - utf::ifstream_line_iterator it( utf::auto_unit_test_suite()->argc <= 1 + ut::ifstream_line_iterator it( ut::framework::master_test_suite().argc <= 1 ? "./test_files/ifstream_line_iterator.tst1" - : utf::auto_unit_test_suite()->argv[1] ); + : ut::framework::master_test_suite().argv[1] ); BOOST_CHECK( it != eoi ); @@ -51,9 +51,9 @@ BOOST_AUTO_TEST_CASE( test_default_delimeter ) BOOST_AUTO_TEST_CASE( test_custom_delimeter ) { - utf::ifstream_line_iterator it( utf::auto_unit_test_suite()->argc <= 2 + ut::ifstream_line_iterator it( ut::framework::master_test_suite().argc <= 2 ? "./test_files/ifstream_line_iterator.tst2" - : utf::auto_unit_test_suite()->argv[2], '}' ); + : ut::framework::master_test_suite().argv[2], '}' ); BOOST_CHECK( it != eoi ); @@ -76,6 +76,9 @@ BOOST_AUTO_TEST_CASE( test_custom_delimeter ) // History : // // $Log$ +// Revision 1.8 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.7 2005/06/11 07:20:45 rogeeff // portability fix // diff --git a/test/output_test_stream_test.cpp b/test/output_test_stream_test.cpp index 255be372..b5fb84ec 100644 --- a/test/output_test_stream_test.cpp +++ b/test/output_test_stream_test.cpp @@ -13,18 +13,17 @@ // *************************************************************************** // Boost.Test +#define BOOST_TEST_MAIN #include #include using boost::test_tools::output_test_stream; -using boost::unit_test::test_suite; // STL #include //____________________________________________________________________________// -void -test_constructor() +BOOST_AUTO_TEST_CASE( test_constructor ) { { output_test_stream output; @@ -65,8 +64,7 @@ test_constructor() //____________________________________________________________________________// -void -test_is_empty() +BOOST_AUTO_TEST_CASE( test_is_empty ) { output_test_stream output; BOOST_CHECK( output.is_empty() ); @@ -85,8 +83,7 @@ test_is_empty() //____________________________________________________________________________// -void -test_check_length() +BOOST_AUTO_TEST_CASE( test_check_length ) { output_test_stream output; BOOST_CHECK( output.check_length( 0 ) ); @@ -111,8 +108,7 @@ test_check_length() //____________________________________________________________________________// -void -test_is_equal() +BOOST_AUTO_TEST_CASE( test_is_equal ) { output_test_stream output; BOOST_CHECK( output.is_equal( "" ) ); @@ -150,11 +146,10 @@ test_is_equal() //____________________________________________________________________________// -void -test_match_pattern() +BOOST_AUTO_TEST_CASE( test_match_pattern ) { - { - output_test_stream output( "pattern.test", false ); + for( int i1 = 0; i1 < 2; i1++ ) { + output_test_stream output( "pattern.test", i1 == 1 ); output << "text1\n"; BOOST_CHECK( output.match_pattern() ); @@ -163,19 +158,10 @@ test_match_pattern() output << "text3\n"; BOOST_CHECK( output.match_pattern() ); } + { output_test_stream output( "pattern.test" ); - - output << "text1\n"; - BOOST_CHECK( output.match_pattern() ); - output << "text2\n"; - BOOST_CHECK( output.match_pattern() ); - output << "text3\n"; - BOOST_CHECK( output.match_pattern() ); - } - { - output_test_stream output( "pattern.test" ); - + output << "text4\n"; BOOST_CHECK( !output.match_pattern() ); output << "text2\n"; @@ -185,7 +171,7 @@ test_match_pattern() } { output_test_stream output( "pattern.test" ); - + output << "text\n"; BOOST_CHECK( !output.match_pattern() ); output << "text2\n"; @@ -193,21 +179,13 @@ test_match_pattern() output << "text3\n"; BOOST_CHECK( !output.match_pattern() ); } -} -//____________________________________________________________________________// + for( int i2 = 0; i2 < 2; i2++ ) { + output_test_stream output( "pattern.test", i2 == 1, false ); -test_suite* -init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { - test_suite* test = BOOST_TEST_SUITE("ostream_test_stream test"); - - test->add( BOOST_TEST_CASE( &test_constructor ) ); - test->add( BOOST_TEST_CASE( &test_is_empty ) ); - test->add( BOOST_TEST_CASE( &test_check_length ) ); - test->add( BOOST_TEST_CASE( &test_is_equal ) ); - test->add( BOOST_TEST_CASE( &test_match_pattern ) ); - - return test; + output << "text\rmore text\n"; + BOOST_CHECK( output.match_pattern() ); + } } //____________________________________________________________________________// @@ -216,30 +194,9 @@ init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { // Revision History : // // $Log$ -// Revision 1.20 2005/05/11 05:07:57 rogeeff -// licence update +// Revision 1.21 2005/12/14 06:01:02 rogeeff +// *** empty log message *** // -// Revision 1.19 2005/01/30 03:35:55 rogeeff -// no message -// -// Revision 1.18 2005/06/05 11:04:17 rogeeff -// no message -// -// Revision 1.17 2005/05/27 06:30:48 rogeeff -// no message -// -// Revision 1.16 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.15 2005/05/11 11:05:06 rogeeff -// basic_cstring introduced and used everywhere -// class properties reworked -// namespace names shortened -// -// Revision 1.14 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 4b73865e..4d41e1bc 100644 --- a/test/parameterized_test_test.cpp +++ b/test/parameterized_test_test.cpp @@ -13,11 +13,9 @@ // *************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include #include -#include -#include #include #include #if BOOST_WORKAROUND( __GNUC__, < 3 ) @@ -213,6 +211,9 @@ BOOST_AUTO_TEST_CASE( test_case8 ) // Revision History : // // $Log$ +// Revision 1.21 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.20 2005/05/11 05:07:57 rogeeff // licence update // diff --git a/test/prg_exec_fail1.cpp b/test/prg_exec_fail1.cpp index 0e04eb66..8ddb1ca4 100644 --- a/test/prg_exec_fail1.cpp +++ b/test/prg_exec_fail1.cpp @@ -26,6 +26,8 @@ #include //Metrowerks linker needs at least one standard library #endif +#include + int cpp_main( int argc, char *[] ) // note the name { @@ -41,6 +43,9 @@ cpp_main( int argc, char *[] ) // note the name // Revision History : // // $Log$ +// Revision 1.15 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.14 2005/05/11 05:07:57 rogeeff // licence update // diff --git a/test/result_report_test.cpp b/test/result_report_test.cpp index e4d534c4..43e34a71 100644 --- a/test/result_report_test.cpp +++ b/test/result_report_test.cpp @@ -14,11 +14,11 @@ // *************************************************************************** // Boost.Test -#include +#include #include -#include #include #include +#include #include #include #if BOOST_WORKAROUND( __GNUC__, < 3 ) @@ -120,7 +120,7 @@ test_main( int argc, char* argv[] ) test_suite* ts_1 = BOOST_TEST_SUITE( "1 test cases inside" ); ts_1->add( BOOST_TEST_CASE( good_foo ) ); - test_suite* ts_1b = BOOST_TEST_SUITE( "1 bad test cases inside" ); + test_suite* ts_1b = BOOST_TEST_SUITE( "1 bad test case inside" ); ts_1b->add( BOOST_TEST_CASE( bad_foo ), 1 ); test_suite* ts_2 = BOOST_TEST_SUITE( "2 test cases inside" ); @@ -141,9 +141,6 @@ test_main( int argc, char* argv[] ) ts_main->add( ts_2 ); ts_main->add( ts_3 ); - framework::run( ts_0 ); - check( test_output, ts_0->p_id ); - framework::run( ts_1 ); check( test_output, ts_1->p_id ); @@ -172,6 +169,9 @@ test_main( int argc, char* argv[] ) // Revision History : // // $Log$ +// Revision 1.23 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.22 2005/05/11 05:07:57 rogeeff // licence update // diff --git a/test/test_case_template_test.cpp b/test/test_case_template_test.cpp index 6a63699b..95f23d9b 100644 --- a/test/test_case_template_test.cpp +++ b/test/test_case_template_test.cpp @@ -13,11 +13,9 @@ // *************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include -#include +#define BOOST_TEST_MAIN +#include #include -#include #include #include @@ -148,6 +146,9 @@ BOOST_AUTO_TEST_CASE( test2_one_to_three ) // Revision History : // // $Log$ +// Revision 1.15 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.14 2005/05/11 05:07:57 rogeeff // licence update // diff --git a/test/test_exec_fail1.cpp b/test/test_exec_fail1.cpp index c1e1adfb..ed37f423 100644 --- a/test/test_exec_fail1.cpp +++ b/test/test_exec_fail1.cpp @@ -15,7 +15,7 @@ // *************************************************************************** // Boost.Test -#include +#include int test_main( int, char* [] ) // note the name { @@ -28,17 +28,8 @@ int test_main( int, char* [] ) // note the name // Revision History : // // $Log$ -// Revision 1.14 2005/05/11 05:07:57 rogeeff -// licence update -// -// Revision 1.13 2005/01/30 03:35:55 rogeeff -// no message -// -// Revision 1.12 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.11 2003/12/01 00:42:38 rogeeff -// prerelease cleaning +// Revision 1.15 2005/12/14 06:01:02 rogeeff +// *** empty log message *** // // *************************************************************************** diff --git a/test/test_exec_fail2.cpp b/test/test_exec_fail2.cpp index 4db8f7b9..78f15684 100644 --- a/test/test_exec_fail2.cpp +++ b/test/test_exec_fail2.cpp @@ -15,7 +15,7 @@ // *************************************************************************** // Boost.Test -#include +#include int test_main( int, char *[] ) // note the name { @@ -38,16 +38,9 @@ int test_main( int, char *[] ) // note the name // Revision History : // // $Log$ -// Revision 1.13 2005/05/11 05:07:57 rogeeff -// licence update +// Revision 1.14 2005/12/14 06:01:02 rogeeff +// *** empty log message *** // -// Revision 1.12 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.11 2003/12/01 00:42:38 rogeeff -// prerelease cleaning -// - // *************************************************************************** // EOF diff --git a/test/test_exec_fail3.cpp b/test/test_exec_fail3.cpp index ef137d25..3d2d1368 100644 --- a/test/test_exec_fail3.cpp +++ b/test/test_exec_fail3.cpp @@ -14,7 +14,7 @@ // *************************************************************************** // Boost.Test -#include +#include int test_main( int, char*[] ) // note the name { @@ -32,16 +32,9 @@ int test_main( int, char*[] ) // note the name // Revision History : // // $Log$ -// Revision 1.13 2005/05/11 05:07:57 rogeeff -// licence update +// Revision 1.14 2005/12/14 06:01:02 rogeeff +// *** empty log message *** // -// Revision 1.12 2005/05/21 06:26:10 rogeeff -// licence update -// -// Revision 1.11 2003/12/01 00:42:38 rogeeff -// prerelease cleaning -// - // *************************************************************************** // EOF diff --git a/test/test_exec_fail4.cpp b/test/test_exec_fail4.cpp index 33717b33..68fca9bc 100644 --- a/test/test_exec_fail4.cpp +++ b/test/test_exec_fail4.cpp @@ -15,7 +15,7 @@ // *************************************************************************** // Boost.Test -#include +#include int test_main( int argc, char* [] ) // note the name { @@ -33,16 +33,9 @@ int test_main( int argc, char* [] ) // note the name // Revision History : // // $Log$ -// Revision 1.14 2005/05/11 05:07:57 rogeeff -// licence update +// Revision 1.15 2005/12/14 06:01:02 rogeeff +// *** empty log message *** // -// Revision 1.13 2005/05/21 06:26:11 rogeeff -// licence update -// -// Revision 1.12 2003/12/01 00:42:38 rogeeff -// prerelease cleaning -// - // *************************************************************************** // EOF diff --git a/test/test_files/errors_handling_test.pattern b/test/test_files/errors_handling_test.pattern index 7c7cef52..fcbd1b53 100644 --- a/test/test_files/errors_handling_test.pattern +++ b/test/test_files/errors_handling_test.pattern @@ -3,8 +3,8 @@ log level: log_successful_tests; error type: no error; Entering test case "error_on_demand" -97: info: check 'no error' passed -197: info: check 'Test case has less failures then expected' passed +98: info: check 'no error' passed +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -12,23 +12,23 @@ log level: log_successful_tests; error type: user message; Entering test case "error_on_demand" message -197: info: check 'Test case has less failures then expected' passed +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== log level: log_successful_tests; error type: user warning; Entering test case "error_on_demand" -105: warning in "error_on_demand": warning -197: info: check 'Test case has less failures then expected' passed +106: warning in "error_on_demand": warning +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== log level: log_successful_tests; error type: user non-fatal error; Entering test case "error_on_demand" -109: error in "error_on_demand": non-fatal error -197: info: check 'Test case has less failures then expected' passed +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" =========================== @@ -36,8 +36,8 @@ 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 -119: last checkpoint: error_on_demand() throw runtime_error -197: info: check 'Test case has less failures then expected' passed +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,16 +45,16 @@ 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 -124: last checkpoint: error_on_demand() divide by zero -197: info: check 'Test case has less failures then expected' passed +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" =========================== log level: log_successful_tests; error type: user fatal error; Entering test case "error_on_demand" -113: fatal error in "error_on_demand": fatal error -197: info: check 'Test case has less failures then expected' passed +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" =========================== @@ -62,9 +62,9 @@ log level: log_successful_tests; error type: system fatal error; Entering test case "error_on_demand" 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address Test is aborted -197: info: check 'Test case has less failures then expected' passed +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -84,14 +84,14 @@ Leaving test case "error_on_demand" log level: log_test_suites; error type: user warning; Entering test case "error_on_demand" -105: warning in "error_on_demand": warning +106: warning in "error_on_demand": warning Leaving test case "error_on_demand" =========================== log level: log_test_suites; error type: user non-fatal error; Entering test case "error_on_demand" -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error Leaving test case "error_on_demand" =========================== @@ -99,7 +99,7 @@ log level: log_test_suites; 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 -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error Leaving test case "error_on_demand" =========================== @@ -107,14 +107,14 @@ log level: log_test_suites; error type: system error; Entering test case "error_on_demand" 0: fatal error in "error_on_demand": integer divide by zero -124: last checkpoint: error_on_demand() divide by zero +125: last checkpoint: error_on_demand() divide by zero Leaving test case "error_on_demand" =========================== log level: log_test_suites; error type: user fatal error; Entering test case "error_on_demand" -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error Leaving test case "error_on_demand" =========================== @@ -122,7 +122,7 @@ log level: log_test_suites; error type: system fatal error; Entering test case "error_on_demand" 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address Test is aborted Leaving test case "error_on_demand" @@ -138,35 +138,35 @@ message =========================== log level: log_messages; error type: user warning; -105: warning in "error_on_demand": warning +106: warning in "error_on_demand": warning =========================== log level: log_messages; error type: user non-fatal error; -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error =========================== log level: log_messages; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_messages; error type: system error; 0: fatal error in "error_on_demand": integer divide by zero -124: last checkpoint: error_on_demand() divide by zero +125: last checkpoint: error_on_demand() divide by zero =========================== log level: log_messages; error type: user fatal error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_messages; error type: system fatal error; 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address Test is aborted =========================== @@ -180,35 +180,35 @@ log level: log_warnings; error type: user message; =========================== log level: log_warnings; error type: user warning; -105: warning in "error_on_demand": warning +106: warning in "error_on_demand": warning =========================== log level: log_warnings; error type: user non-fatal error; -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error =========================== log level: log_warnings; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_warnings; error type: system error; 0: fatal error in "error_on_demand": integer divide by zero -124: last checkpoint: error_on_demand() divide by zero +125: last checkpoint: error_on_demand() divide by zero =========================== log level: log_warnings; error type: user fatal error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_warnings; error type: system fatal error; 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address =========================== log level: log_all_errors; error type: no error; @@ -225,30 +225,30 @@ log level: log_all_errors; error type: user warning; =========================== log level: log_all_errors; error type: user non-fatal error; -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error =========================== log level: log_all_errors; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_all_errors; error type: system error; 0: fatal error in "error_on_demand": integer divide by zero -124: last checkpoint: error_on_demand() divide by zero +125: last checkpoint: error_on_demand() divide by zero =========================== log level: log_all_errors; error type: user fatal error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_all_errors; error type: system fatal error; 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address =========================== log level: log_cpp_exception_errors; error type: no error; @@ -270,24 +270,24 @@ log level: log_cpp_exception_errors; error type: user non-fatal error; log level: log_cpp_exception_errors; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_cpp_exception_errors; error type: system error; 0: fatal error in "error_on_demand": integer divide by zero -124: last checkpoint: error_on_demand() divide by zero +125: last checkpoint: error_on_demand() divide by zero =========================== log level: log_cpp_exception_errors; error type: user fatal error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_cpp_exception_errors; error type: system fatal error; 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address =========================== log level: log_system_errors; error type: no error; @@ -313,18 +313,18 @@ log level: log_system_errors; error type: cpp exception; log level: log_system_errors; error type: system error; 0: fatal error in "error_on_demand": integer divide by zero -124: last checkpoint: error_on_demand() divide by zero +125: last checkpoint: error_on_demand() divide by zero =========================== log level: log_system_errors; error type: user fatal error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_system_errors; error type: system fatal error; 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address =========================== log level: log_fatal_errors; error type: no error; @@ -353,13 +353,13 @@ log level: log_fatal_errors; error type: system error; =========================== log level: log_fatal_errors; error type: user fatal error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_fatal_errors; error type: system fatal error; 0: fatal error in "error_on_demand": memory access violation -129: last checkpoint: write to an invalid address +130: last checkpoint: write to an invalid address =========================== log level: log_nothing; error type: no error; diff --git a/test/test_files/errors_handling_test.pattern2 b/test/test_files/errors_handling_test.pattern2 index 2b0d303c..ab31b482 100755 --- a/test/test_files/errors_handling_test.pattern2 +++ b/test/test_files/errors_handling_test.pattern2 @@ -3,8 +3,8 @@ log level: log_successful_tests; error type: no error; Entering test case "error_on_demand" -97: info: check 'no error' passed -197: info: check 'Test case has less failures then expected' passed +98: info: check 'no error' passed +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== @@ -12,23 +12,23 @@ log level: log_successful_tests; error type: user message; Entering test case "error_on_demand" message -197: info: check 'Test case has less failures then expected' passed +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== log level: log_successful_tests; error type: user warning; Entering test case "error_on_demand" -105: warning in "error_on_demand": warning -197: info: check 'Test case has less failures then expected' passed +106: warning in "error_on_demand": warning +202: info: check 'Test case has less failures then expected' passed Leaving test case "error_on_demand" =========================== log level: log_successful_tests; error type: user non-fatal error; Entering test case "error_on_demand" -109: error in "error_on_demand": non-fatal error -197: info: check 'Test case has less failures then expected' passed +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" =========================== @@ -36,16 +36,16 @@ 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 -119: last checkpoint: error_on_demand() throw runtime_error -197: info: check 'Test case has less failures then expected' passed +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" =========================== log level: log_successful_tests; error type: system error; Entering test case "error_on_demand" -113: fatal error in "error_on_demand": fatal error -197: info: check 'Test case has less failures then expected' passed +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" =========================== @@ -65,14 +65,14 @@ Leaving test case "error_on_demand" log level: log_test_suites; error type: user warning; Entering test case "error_on_demand" -105: warning in "error_on_demand": warning +106: warning in "error_on_demand": warning Leaving test case "error_on_demand" =========================== log level: log_test_suites; error type: user non-fatal error; Entering test case "error_on_demand" -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error Leaving test case "error_on_demand" =========================== @@ -80,14 +80,14 @@ log level: log_test_suites; 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 -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error Leaving test case "error_on_demand" =========================== log level: log_test_suites; error type: system error; Entering test case "error_on_demand" -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error Leaving test case "error_on_demand" =========================== @@ -102,23 +102,23 @@ message =========================== log level: log_messages; error type: user warning; -105: warning in "error_on_demand": warning +106: warning in "error_on_demand": warning =========================== log level: log_messages; error type: user non-fatal error; -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error =========================== log level: log_messages; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_messages; error type: system error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_warnings; error type: no error; @@ -131,23 +131,23 @@ log level: log_warnings; error type: user message; =========================== log level: log_warnings; error type: user warning; -105: warning in "error_on_demand": warning +106: warning in "error_on_demand": warning =========================== log level: log_warnings; error type: user non-fatal error; -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error =========================== log level: log_warnings; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_warnings; error type: system error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_all_errors; error type: no error; @@ -164,18 +164,18 @@ log level: log_all_errors; error type: user warning; =========================== log level: log_all_errors; error type: user non-fatal error; -109: error in "error_on_demand": non-fatal error +110: error in "error_on_demand": non-fatal error =========================== log level: log_all_errors; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_all_errors; error type: system error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_cpp_exception_errors; error type: no error; @@ -197,12 +197,12 @@ log level: log_cpp_exception_errors; error type: user non-fatal error; log level: log_cpp_exception_errors; error type: cpp exception; 0: fatal error in "error_on_demand": std::runtime_error: test std::runtime error what() message -119: last checkpoint: error_on_demand() throw runtime_error +120: last checkpoint: error_on_demand() throw runtime_error =========================== log level: log_cpp_exception_errors; error type: system error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_system_errors; error type: no error; @@ -227,7 +227,7 @@ log level: log_system_errors; error type: cpp exception; =========================== log level: log_system_errors; error type: system error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_fatal_errors; error type: no error; @@ -252,7 +252,7 @@ log level: log_fatal_errors; error type: cpp exception; =========================== log level: log_fatal_errors; error type: system error; -113: fatal error in "error_on_demand": fatal error +114: fatal error in "error_on_demand": fatal error =========================== log level: log_nothing; error type: no error; diff --git a/test/test_files/result_report_test.pattern b/test/test_files/result_report_test.pattern index ead93da1..9bab48aa 100644 --- a/test/test_files/result_report_test.pattern +++ b/test/test_files/result_report_test.pattern @@ -2,20 +2,6 @@ *** No errors detected ************************************************************************* -Test suite "0 test cases inside" passed - -************************************************************************* - -Test suite "0 test cases inside" passed - -************************************************************************* -************************************************************************* -************************************************************************* -************************************************************************* - -*** No errors detected -************************************************************************* - Test suite "1 test cases inside" passed with: 1 assertion out of 1 passed 1 test case out of 1 passed @@ -30,14 +16,14 @@ Test suite "1 test cases inside" passed with: 1 assertion out of 1 passed ************************************************************************* -************************************************************************* -************************************************************************* -************************************************************************* +************************************************************************* +************************************************************************* +************************************************************************* *** No errors detected ************************************************************************* -Test suite "1 bad test cases inside" passed with: +Test suite "1 bad test case inside" passed with: 1 assertion out of 2 passed 1 assertion out of 2 failed 1 failure expected @@ -45,7 +31,7 @@ Test suite "1 bad test cases inside" passed with: ************************************************************************* -Test suite "1 bad test cases inside" passed with: +Test suite "1 bad test case inside" passed with: 1 assertion out of 2 passed 1 assertion out of 2 failed 1 failure expected @@ -57,9 +43,9 @@ Test suite "1 bad test cases inside" passed with: 1 failure expected ************************************************************************* -************************************************************************* -************************************************************************* -************************************************************************* +************************************************************************* +************************************************************************* +************************************************************************* *** No errors detected ************************************************************************* @@ -87,11 +73,11 @@ Test suite "2 test cases inside" passed with: 1 failure expected ************************************************************************* -************************************************************************* -************************************************************************* -************************************************************************* +************************************************************************* +************************************************************************* +************************************************************************* -*** 2 failures detected in test suite "3 test cases inside" +*** 3 failures detected in test suite "3 test cases inside" ************************************************************************* Test suite "3 test cases inside" failed with: @@ -99,6 +85,7 @@ Test suite "3 test cases inside" failed with: 2 assertions out of 4 failed 2 test cases out of 3 failed 1 test case out of 3 skipped + 1 test case out of 3 aborted ************************************************************************* @@ -107,6 +94,7 @@ Test suite "3 test cases inside" failed with: 2 assertions out of 4 failed 2 test cases out of 3 failed 1 test case out of 3 skipped + 1 test case out of 3 aborted Test case "bad_foo" failed with: 1 assertion out of 2 passed @@ -116,11 +104,11 @@ Test suite "3 test cases inside" failed with: 1 assertion out of 2 passed 1 assertion out of 2 failed - Test case "bad_foo" skipped + Test case "bad_foo" skipped due to failed dependancy ************************************************************************* -************************************************************************* -************************************************************************* -************************************************************************* +************************************************************************* +************************************************************************* +************************************************************************* *** No errors detected ************************************************************************* @@ -164,8 +152,8 @@ Test suite "Fake Test Suite Hierarchy" passed with: 1 assertion out of 2 failed 1 failure expected - Test suite "3 test cases inside" skipped + Test suite "3 test cases inside" skipped due to failed dependancy ************************************************************************* -************************************************************************* -************************************************************************* -************************************************************************* +************************************************************************* +************************************************************************* +************************************************************************* diff --git a/test/test_files/test_tools_test.pattern b/test/test_files/test_tools_test.pattern index b1d1e868..f8b2f62e 100644 --- a/test/test_files/test_tools_test.pattern +++ b/test/test_files/test_tools_test.pattern @@ -1,55 +1,55 @@ 129: warning in "test_BOOST_WARN": condition sizeof(int) == sizeof(short) is not satisfied 132: info: check sizeof(unsigned char) == sizeof(char) passed -146: error in "test_BOOST_CHECK": check false failed -147: error in "test_BOOST_CHECK": check 1==2 failed -148: error in "test_BOOST_CHECK": check i==1 failed -151: info: check i==2 passed -158: error in "test_BOOST_REQUIRE": not aborted -160: fatal error in "test_BOOST_REQUIRE": critical test false failed -164: fatal error in "test_BOOST_REQUIRE": critical test j > 5 failed -167: info: check j < 5 passed -167: error in "test_BOOST_REQUIRE": not aborted -181: info: check 'object size 33 is too small' passed -198: error in "test_BOOST_CHECK_MESSAGE": Well, may be that what I believe in -200: error in "test_BOOST_CHECK_MESSAGE": Checking predicate failed. Some explanation -203: info: check 'Could it fail?' passed -210: fatal error in "test_BOOST_REQUIRE_MESSAGE": Here we should stop -213: info: check 'That's OK' passed -213: error in "test_BOOST_REQUIRE_MESSAGE": not aborted -220: error in "test_BOOST_ERROR": Fail to miss an error -227: fatal error in "test_BOOST_FAIL": No! No! Show must go on. -243: error in "test_BOOST_CHECK_THROW": exception my_exception is expected -246: warning in "test_BOOST_CHECK_THROW": exception my_exception is expected -249: fatal error in "test_BOOST_CHECK_THROW": exception my_exception is expected -252: info: check 'exception my_exception is caught' passed -259: error in "test_BOOST_CHECK_EXCEPTION": incorrect exception my_exception is caught -262: info: check 'incorrect exception my_exception is caught' passed -272: error in "test_BOOST_CHECK_NO_THROW": exception thrown by throw my_exception() -318: error in "test_BOOST_CHECK_EQUAL": check i == j failed [1 != 2] -324: error in "test_BOOST_CHECK_EQUAL": check str1 == str2 failed [test1 != test12] -327: error in "test_BOOST_CHECK_EQUAL": check i+1 == j failed [4 != 2] -330: info: check str1 == str3+1 passed -339: fatal error in "test_BOOST_CHECK_EQUAL": critical test str1 == str2 failed [test != null string] -345: warning in "test_BOOST_CHECK_EQUAL": condition b1 == b2 is not satisfied [B(1) != B(2)] -351: error in "test_BOOST_CHECK_EQUAL": check c1 == c3 failed [C(0,100) != C(1,102)]. Index mismatch -352: error in "test_BOOST_CHECK_EQUAL": check c1 == c2 failed [C(0,100) != C(0,101)]. Id mismatch -382: error in "test_BOOST_CHECK_PREDICATE": check is_even( i ) failed for ( 17 ) -385: error in "test_BOOST_CHECK_PREDICATE": check not_equal_to()( i, 17 ) failed for ( 17, 17 ) -391: warning in "test_BOOST_CHECK_PREDICATE": condition moo( 12, i, j ) is not satisfied for ( 12, 17, 15 ) -399: error in "test_BOOST_CHECK_PREDICATE": check compare_lists( l1, l2 ) failed for ( , ). Different sizes [2!=0] -410: error in "test_BOOST_REQUIRE_PREDICATE": not aborted -412: fatal error in "test_BOOST_REQUIRE_PREDICATE": critical test less_equal()( arg2, arg1 ) failed for ( 2, 1 ) -433: error in "test_BOOST_CHECK_EQUAL_COLLECTIONS": check { testlist.begin(), testlist.end() } == { pattern, pattern+7 } failed. +154: error in "test_BOOST_CHECK": check false failed +155: error in "test_BOOST_CHECK": check 1==2 failed +156: error in "test_BOOST_CHECK": check i==1 failed +159: info: check i==2 passed +166: error in "test_BOOST_REQUIRE": not aborted +168: fatal error in "test_BOOST_REQUIRE": critical test false failed +172: fatal error in "test_BOOST_REQUIRE": critical test j > 5 failed +175: info: check j < 5 passed +175: error in "test_BOOST_REQUIRE": not aborted +189: info: check 'object size 33 is too small' passed +206: error in "test_BOOST_CHECK_MESSAGE": Well, may be that what I believe in +208: error in "test_BOOST_CHECK_MESSAGE": Checking predicate failed. Some explanation +211: info: check 'Could it fail?' passed +218: fatal error in "test_BOOST_REQUIRE_MESSAGE": Here we should stop +221: info: check 'That's OK' passed +221: error in "test_BOOST_REQUIRE_MESSAGE": not aborted +228: error in "test_BOOST_ERROR": Fail to miss an error +235: fatal error in "test_BOOST_FAIL": No! No! Show must go on. +251: error in "test_BOOST_CHECK_THROW": exception my_exception is expected +254: warning in "test_BOOST_CHECK_THROW": exception my_exception is expected +257: fatal error in "test_BOOST_CHECK_THROW": exception my_exception is expected +260: info: check 'exception my_exception is caught' passed +267: error in "test_BOOST_CHECK_EXCEPTION": incorrect exception my_exception is caught +270: info: check 'incorrect exception my_exception is caught' passed +280: error in "test_BOOST_CHECK_NO_THROW": exception thrown by throw my_exception() +326: error in "test_BOOST_CHECK_EQUAL": check i == j failed [1 != 2] +332: error in "test_BOOST_CHECK_EQUAL": check str1 == str2 failed [test1 != test12] +335: error in "test_BOOST_CHECK_EQUAL": check i+1 == j failed [4 != 2] +338: info: check str1 == str3+1 passed +347: fatal error in "test_BOOST_CHECK_EQUAL": critical test str1 == str2 failed [test != null string] +353: warning in "test_BOOST_CHECK_EQUAL": condition b1 == b2 is not satisfied [B(1) != B(2)] +359: error in "test_BOOST_CHECK_EQUAL": check c1 == c3 failed [C(0,100) != C(1,102)]. Index mismatch +360: error in "test_BOOST_CHECK_EQUAL": check c1 == c2 failed [C(0,100) != C(0,101)]. Id mismatch +390: error in "test_BOOST_CHECK_PREDICATE": check is_even( i ) failed for ( 17 ) +393: error in "test_BOOST_CHECK_PREDICATE": check not_equal_to()( i, 17 ) failed for ( 17, 17 ) +399: warning in "test_BOOST_CHECK_PREDICATE": condition moo( 12, i, j ) is not satisfied for ( 12, 17, 15 ) +407: error in "test_BOOST_CHECK_PREDICATE": check compare_lists( l1, l2 ) failed for ( , ). Different sizes [2!=0] +418: error in "test_BOOST_REQUIRE_PREDICATE": not aborted +420: fatal error in "test_BOOST_REQUIRE_PREDICATE": critical test less_equal()( arg2, arg1 ) failed for ( 2, 1 ) +441: error in "test_BOOST_CHECK_EQUAL_COLLECTIONS": check { testlist.begin(), testlist.end() } == { pattern, pattern+7 } failed. Mismatch in a position 2: 4 != 3 Mismatch in a position 5: 7 != 6 -434: error in "test_BOOST_CHECK_EQUAL_COLLECTIONS": check { testlist.begin(), testlist.end() } == { pattern, pattern+2 } failed. +442: error in "test_BOOST_CHECK_EQUAL_COLLECTIONS": check { testlist.begin(), testlist.end() } == { pattern, pattern+2 } failed. Collections size mismatch: 7 != 2 -443: error in "test_BOOST_CHECK_BITWISE_EQUAL": check (char)0x06 =.= (char)0x16 failed. +451: error in "test_BOOST_CHECK_BITWISE_EQUAL": check (char)0x06 =.= (char)0x16 failed. Mismatch in a position 4 -446: warning in "test_BOOST_CHECK_BITWISE_EQUAL": condition (char)0x26 =.= (char)0x04 is not satisfied. +454: warning in "test_BOOST_CHECK_BITWISE_EQUAL": condition (char)0x26 =.= (char)0x04 is not satisfied. Mismatch in a position 1 Mismatch in a position 5 -449: fatal error in "test_BOOST_CHECK_BITWISE_EQUAL": critical test (char)0x26 =.= (int)0x26 failed. +457: fatal error in "test_BOOST_CHECK_BITWISE_EQUAL": critical test (char)0x26 =.= (int)0x26 failed. Operands bit sizes mismatch: 8 != 32 still testing 1+1=2 @@ -57,5 +57,7 @@ still testing struct A 0x14 20 -0: fatal error in "test_BOOST_CHECKPOINT": C string: some error -484: last checkpoint: Going to do a silly things +0: fatal error in "test_BOOST_TEST_CHECKPOINT": C string: some error +492: last checkpoint: Going to do a silly things +0: fatal error in "test_BOOST_TEST_PASSPOINT": memory access violation +502: last checkpoint diff --git a/test/test_fp_comparisons.cpp b/test/test_fp_comparisons.cpp index f01239b0..b2c30080 100644 --- a/test/test_fp_comparisons.cpp +++ b/test/test_fp_comparisons.cpp @@ -13,8 +13,8 @@ // *************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include #include #include @@ -29,7 +29,7 @@ using namespace boost; using namespace boost::unit_test; using namespace boost::test_tools; -bool not_func( bool arg ) { return !arg; } +bool not_func( bool argb ) { return !argb; } //____________________________________________________________________________// @@ -50,7 +50,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_BOOST_CHECK_CLOSE, FPT, test_types ) fp2 = static_cast(second); \ epsilon = static_cast(e); \ \ - BOOST_CHECK_PREDICATE( bind(not_func, bind(check_is_close, _1, _2, _3)), (fp1)(fp2)(epsilon) ); \ + BOOST_CHECK_PREDICATE( bind(not_func, bind(check_is_close, _1, _2, _3)), \ + (fp1)(fp2)(percent_tolerance( epsilon )) ); \ /**/ FPT fp1, fp2, epsilon; @@ -76,6 +77,58 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_BOOST_CHECK_CLOSE, FPT, test_types ) CHECK_CLOSE( 1.0002, 1.0001, 1.1e-2 ); CHECK_NOT_CLOSE( 1, 1.0002, 1.1e-2 ); + +#undef CHECK_CLOSE +#undef CHECK_NOT_CLOSE +} + +//____________________________________________________________________________// + +BOOST_AUTO_TEST_CASE_TEMPLATE( test_CHECK_CLOSE_FRACTION, FPT, test_types ) +{ +#define CHECK_CLOSE( first, second, e ) \ + fp1 = static_cast(first); \ + fp2 = static_cast(second); \ + epsilon = static_cast(e); \ + \ + BOOST_CHECK_CLOSE( fp1, fp2, epsilon ); \ +/**/ + +#define CHECK_NOT_CLOSE( first, second, e ) \ + fp1 = static_cast(first); \ + fp2 = static_cast(second); \ + epsilon = static_cast(e); \ + \ + BOOST_CHECK_PREDICATE( bind(not_func, bind(check_is_close, _1, _2, _3)), \ + (fp1)(fp2)(fraction_tolerance( epsilon )) ); \ +/**/ + + FPT fp1, fp2, epsilon; + + CHECK_CLOSE( 1, 1, 0 ); + + CHECK_NOT_CLOSE( 0, 1e-20, 1e-5 ); + CHECK_NOT_CLOSE( 0, 1e-30, 1e-5 ); + CHECK_NOT_CLOSE( 0, -1e-10, 0.1 ); + CHECK_NOT_CLOSE( 0.123456, 0.123457, 1e-6 ); + + CHECK_CLOSE( 0.123456, 0.123457, 1e-3 ); + + CHECK_NOT_CLOSE( 0.123456, -0.123457, 1e-3 ); + + CHECK_CLOSE( 1.23456e28, 1.23457e28, 1e-3 ); + + CHECK_CLOSE( 1.23456e-10, 1.23457e-10, 1e-3 ); + CHECK_NOT_CLOSE( 1.111e-10, 1.112e-10, 0.0008999 ); + CHECK_CLOSE( 1.112e-10, 1.111e-10, 0.1 ); + + CHECK_CLOSE( 1, 1.0001, 1.1e-2 ); + CHECK_CLOSE( 1.0002, 1.0001, 1.1e-2 ); + + CHECK_NOT_CLOSE( 1, 1.0002, 1.1e-4 ); + +#undef CHECK_CLOSE +#undef CHECK_NOT_CLOSE } //____________________________________________________________________________// @@ -96,17 +149,20 @@ BOOST_AUTO_TEST_CASE( test_close_at_tolerance ) double fp2 = 1.00000002; double epsilon = 1e-6; - close_at_tolerance pred( epsilon, FPC_WEAK ); + close_at_tolerance pred( percent_tolerance( epsilon ), FPC_WEAK ); BOOST_CHECK_PREDICATE( pred, (fp1)(fp2) ); - BOOST_CHECK_PREDICATE( bind(not_func, bind(check_is_close, _1, _2, _3)), (fp1)(fp2)(epsilon) ); + BOOST_CHECK_PREDICATE( bind(not_func, bind(check_is_close, _1, _2, _3)), + (fp1)(fp2)(percent_tolerance( epsilon )) ); fp1 = 1.23456e-10; fp2 = 1.23457e-10; epsilon = 8.1e-4; - BOOST_CHECK_PREDICATE( close_at_tolerance( epsilon, FPC_WEAK ), (fp1)(fp2) ); - BOOST_CHECK_PREDICATE( bind(not_func, bind(close_at_tolerance( epsilon ), _1, _2)), (fp1)(fp2) ); + BOOST_CHECK_PREDICATE( close_at_tolerance( percent_tolerance( epsilon ), FPC_WEAK ), (fp1)(fp2) ); + BOOST_CHECK_PREDICATE( + bind(not_func, + bind(close_at_tolerance( percent_tolerance( epsilon ) ), _1, _2)), (fp1)(fp2) ); } //____________________________________________________________________________// @@ -115,6 +171,9 @@ BOOST_AUTO_TEST_CASE( test_close_at_tolerance ) // Revision History : // // $Log$ +// Revision 1.23 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.22 2005/05/29 08:54:04 rogeeff // remove format testing // diff --git a/test/test_tools_test.cpp b/test/test_tools_test.cpp index ce2c1d7f..a376f675 100644 --- a/test/test_tools_test.cpp +++ b/test/test_tools_test.cpp @@ -13,8 +13,8 @@ // *************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include #include #include #include @@ -77,9 +77,9 @@ output_test_stream& ots() if( !inst ) { inst.reset( - auto_unit_test_suite()->argc <= 1 + framework::master_test_suite().argc <= 1 ? new output_test_stream( runtime_config::save_pattern() ? save_file_name : match_file_name, !runtime_config::save_pattern() ) - : new output_test_stream( auto_unit_test_suite()->argv[1], !runtime_config::save_pattern() ) ); + : new output_test_stream( framework::master_test_suite().argv[1], !runtime_config::save_pattern() ) ); } return *inst; @@ -136,7 +136,15 @@ TEST_CASE( test_BOOST_WARN ) TEST_CASE( test_BOOST_CHECK ) { - BOOST_CHECK( true ); + // check correct behavior in if clause + if( true ) + BOOST_CHECK( true ); + + // check correct behavior in else clause + if( false ) + {} + else + BOOST_CHECK( true ); bool_convertible bc; BOOST_CHECK( bc ); @@ -455,39 +463,47 @@ struct A { friend std::ostream& operator<<( std::ostream& str, A const& a ) { str << "struct A"; return str;} }; -TEST_CASE( test_BOOST_MESSAGE ) +TEST_CASE( test_BOOST_TEST_MESSAGE ) { unit_test_log.set_threshold_level( log_messages ); - BOOST_MESSAGE( "still testing" ); - BOOST_MESSAGE( "1+1=" << 2 ); + BOOST_TEST_MESSAGE( "still testing" ); + BOOST_TEST_MESSAGE( "1+1=" << 2 ); int i = 2; - BOOST_MESSAGE( i << "+" << i << "=" << (i+i) ); + BOOST_TEST_MESSAGE( i << "+" << i << "=" << (i+i) ); A a = A(); - BOOST_MESSAGE( a ); + BOOST_TEST_MESSAGE( a ); #if !defined(BOOST_NO_STD_LOCALE) && ( !defined(BOOST_MSVC) || BOOST_WORKAROUND(BOOST_MSVC, >= 1310)) - BOOST_MESSAGE( std::hex << std::showbase << 20 ); + BOOST_TEST_MESSAGE( std::hex << std::showbase << 20 ); #else - BOOST_MESSAGE( "0x14" ); + BOOST_TEST_MESSAGE( "0x14" ); #endif - BOOST_MESSAGE( std::setw( 4 ) << 20 ); + BOOST_TEST_MESSAGE( std::setw( 4 ) << 20 ); } //____________________________________________________________________________// -TEST_CASE( test_BOOST_CHECKPOINT ) +TEST_CASE( test_BOOST_TEST_CHECKPOINT ) { - BOOST_CHECKPOINT( "Going to do a silly things" ); + BOOST_TEST_CHECKPOINT( "Going to do a silly things" ); throw "some error"; } //____________________________________________________________________________// +TEST_CASE( test_BOOST_TEST_PASSPOINT ) +{ + int* p = 0; + BOOST_CHECK( *p == 0 ); +} + +//____________________________________________________________________________// + TEST_CASE( test_BOOST_IS_DEFINED ) { #define SYMBOL1 @@ -506,10 +522,15 @@ TEST_CASE( test_BOOST_IS_DEFINED ) //____________________________________________________________________________// +// !! CHECK_SMALL + // *************************************************************************** // Revision History : // // $Log$ +// Revision 1.44 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.43 2005/05/11 05:07:57 rogeeff // licence update // diff --git a/test/token_iterator_test.cpp b/test/token_iterator_test.cpp index 109e0a3c..5723d377 100644 --- a/test/token_iterator_test.cpp +++ b/test/token_iterator_test.cpp @@ -13,8 +13,8 @@ // ***************************************************************************** // Boost.Test -#define BOOST_AUTO_TEST_MAIN -#include +#define BOOST_TEST_MAIN +#include #include // BOOST @@ -191,6 +191,9 @@ BOOST_AUTO_TEST_CASE( test_istream_token_iterator ) // History : // // $Log$ +// Revision 1.13 2005/12/14 06:01:02 rogeeff +// *** empty log message *** +// // Revision 1.12 2005/06/11 19:20:58 rogeeff // *** empty log message *** //