diff --git a/example/prg_exec_example.cpp b/example/prg_exec_example.cpp index 0ea3ef7b..5326b478 100644 --- a/example/prg_exec_example.cpp +++ b/example/prg_exec_example.cpp @@ -1,4 +1,11 @@ -// boost Program Execution Monitor example program -------------------------// +// (C) Copyright Gennadiy Rozental 2001-2003. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. +// This software is provided "as is" without express or implied warranty, +// and with no claim as to its suitability for any purpose. +// +// See http://www.boost.org for most recent version including documentation. + int add( int i, int j ) { return i+j; } int cpp_main( int, char *[] ) // note the name! @@ -6,5 +13,7 @@ int cpp_main( int, char *[] ) // note the name! // two ways to detect and report the same error: if ( add(2,2) != 4 ) throw "Oops..."; // #1 throws on error - return add(2,2) == 4 ? 0 : 1; // #2 returns error directly -} \ No newline at end of file + return add(2,2) == 4 ? 15 : 1; // #2 returns error directly +} + +// EOF diff --git a/example/test_exec_example.cpp b/example/test_exec_example.cpp index 9d45b1f7..ab87fef7 100644 --- a/example/test_exec_example.cpp +++ b/example/test_exec_example.cpp @@ -1,4 +1,10 @@ -// boost Test Execution Monitor example program ------------------------// +// (C) Copyright Gennadiy Rozental 2001-2003. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. +// This software is provided "as is" without express or implied warranty, +// and with no claim as to its suitability for any purpose. +// +// See http://www.boost.org for most recent version including documentation. // Boost.Test #include @@ -23,3 +29,5 @@ int test_main( int, char* [] ) // note the name! return add(2,2) == 4 ? 0 : 1; // #6 returns error code } + +// EOF diff --git a/example/unit_test_example1.cpp b/example/unit_test_example1.cpp index 44d17eed..37fb58c8 100644 --- a/example/unit_test_example1.cpp +++ b/example/unit_test_example1.cpp @@ -1,3 +1,4 @@ +// (C) Copyright Gennadiy Rozental 2002-2003. // (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -18,7 +19,7 @@ void free_test_function() } test_suite* -init_unit_test_suite( int argc, char * argv[] ) { +init_unit_test_suite( int, char* [] ) { test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); // this example will pass cause we know ahead of time number of expected failures diff --git a/example/unit_test_example2.cpp b/example/unit_test_example2.cpp index f5d96327..04930ab5 100644 --- a/example/unit_test_example2.cpp +++ b/example/unit_test_example2.cpp @@ -1,3 +1,4 @@ +// (C) Copyright Gennadiy Rozental 2002-2003. // (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. diff --git a/example/unit_test_example4.cpp b/example/unit_test_example4.cpp index 5c876aec..bc434659 100644 --- a/example/unit_test_example4.cpp +++ b/example/unit_test_example4.cpp @@ -1,3 +1,4 @@ +// (C) Copyright Gennadiy Rozental 2002-2003. // (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. diff --git a/example/unit_test_example5.cpp b/example/unit_test_example5.cpp index 60f9f568..f799c315 100644 --- a/example/unit_test_example5.cpp +++ b/example/unit_test_example5.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, diff --git a/test/auto_unit_test_test.cpp b/test/auto_unit_test_test.cpp index 4c03910a..81966ad2 100644 --- a/test/auto_unit_test_test.cpp +++ b/test/auto_unit_test_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : unit test for auto unit test facility // *************************************************************************** @@ -32,6 +32,9 @@ BOOST_AUTO_UNIT_TEST( test2 ) // Revision History : // // $Log$ +// Revision 1.2 2003/06/09 09:23:03 rogeeff +// 1.30.beta1 +// // Revision 1.1 2002/12/09 05:13:31 rogeeff // Initial commit // diff --git a/test/errors_handling_test.cpp b/test/errors_handling_test.cpp index aead4105..9f9ee253 100644 --- a/test/errors_handling_test.cpp +++ b/test/errors_handling_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests an ability of Unit Test Framework to catch all kinds // of test errors in a user code and properly report it. @@ -233,6 +233,9 @@ test_main( int argc, char * argv[] ) // Revision History : // // $Log$ +// Revision 1.12 2003/06/09 09:23:03 rogeeff +// 1.30.beta1 +// // Revision 1.11 2003/02/15 21:49:57 rogeeff // borland warning fix // diff --git a/test/minimal_test.cpp b/test/minimal_test.cpp index 53527fa5..dd85b01a 100644 --- a/test/minimal_test.cpp +++ b/test/minimal_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : minimal testing unit test // *************************************************************************** @@ -77,6 +77,9 @@ test_main( int /*argc*/, char* /*argv*/[] ) // Revision History : // // $Log$ +// Revision 1.5 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.4 2003/02/15 21:51:56 rogeeff // borland warnings fix // diff --git a/test/online_test.cpp b/test/online_test.cpp index 69213121..f2430b1c 100644 --- a/test/online_test.cpp +++ b/test/online_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : included Test Execution Monitor test // *************************************************************************** @@ -28,6 +28,9 @@ test_main( int /*argc*/, char* /*argv*/[] ) // Revision History : // // $Log$ +// Revision 1.9 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.8 2003/02/15 21:51:56 rogeeff // borland warnings fix // diff --git a/test/output_test_stream_test.cpp b/test/output_test_stream_test.cpp index 1813de5b..17402296 100644 --- a/test/output_test_stream_test.cpp +++ b/test/output_test_stream_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests output_test_stream test tool functionality // *************************************************************************** @@ -211,6 +211,9 @@ init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { // Revision History : // // $Log$ +// Revision 1.10 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.9 2003/02/15 21:51:17 rogeeff // borland warnings fix // cwpro complains on size_t fix diff --git a/test/parameterized_test_test.cpp b/test/parameterized_test_test.cpp index c18a7220..edb0bccd 100644 --- a/test/parameterized_test_test.cpp +++ b/test/parameterized_test_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2002. +// (C) Copyright Gennadiy Rozental 2002-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -6,9 +6,9 @@ // See http://www.boost.org for most recent version including documentation. // -// File : $$ +// File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests parameterized tests // *************************************************************************** @@ -69,6 +69,7 @@ int test_main( int, char* [] ) { { int test_data[] = { 2, 2, 2 }; test.reset( BOOST_PARAM_TEST_CASE__( &test0, (int*)test_data, (int*)test_data + sizeof(test_data)/sizeof(int) ) ); + test->run(); unit_test_result::instance().failures_details( num_of_failures, exception_caught ); @@ -166,6 +167,9 @@ int test_main( int, char* [] ) { // Revision History : // // $Log$ +// Revision 1.5 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.4 2003/02/15 21:52:37 rogeeff // mingw ostream fix // diff --git a/test/prg_exec_fail1.cpp b/test/prg_exec_fail1.cpp index b203f0d5..9b5e0eca 100644 --- a/test/prg_exec_fail1.cpp +++ b/test/prg_exec_fail1.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests an ability of Program Execution Monitor to catch // uncatched exceptions. Should fail during run. @@ -30,6 +30,9 @@ cpp_main( int argc, char *[] ) // note the name // Revision History : // // $Log$ +// Revision 1.7 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.6 2003/02/15 21:49:58 rogeeff // borland warning fix // diff --git a/test/prg_exec_fail2.cpp b/test/prg_exec_fail2.cpp index 92ab1fb3..ed8fdfa2 100644 --- a/test/prg_exec_fail2.cpp +++ b/test/prg_exec_fail2.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests an ability of Program Execution Monitor to catch // system exceptions. Should fail during run. @@ -27,6 +27,9 @@ int cpp_main( int, char *[] ) // note the name // Revision History : // // $Log$ +// Revision 1.7 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.6 2002/12/09 05:16:50 rogeeff // *** empty log message *** // diff --git a/test/prg_exec_fail3.cpp b/test/prg_exec_fail3.cpp index 3638bf74..0d085b38 100644 --- a/test/prg_exec_fail3.cpp +++ b/test/prg_exec_fail3.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2002. +// (C) Copyright Gennadiy Rozental 2002-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,9 +8,9 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // -// Description : tests an ability of Program Execution Monitor to catch +// Description : tests an ability of the Program Execution Monitor to catch // user fatal exceptions. Should fail during run. But not crash. // *************************************************************************** @@ -31,6 +31,9 @@ int cpp_main( int, char *[] ) // note the name // Revision History : // // $Log$ +// Revision 1.2 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.1 2002/12/09 05:13:31 rogeeff // Initial commit // diff --git a/test/result_report_test.cpp b/test/result_report_test.cpp index 41aac2f9..91c619ae 100644 --- a/test/result_report_test.cpp +++ b/test/result_report_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests Unit Test Framework reporting facilities against // pattern file @@ -148,6 +148,9 @@ test_main( int argc, char* argv[] ) // Revision History : // // $Log$ +// Revision 1.9 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.8 2003/02/15 21:52:37 rogeeff // mingw ostream fix // diff --git a/test/test_exec_fail1.cpp b/test/test_exec_fail1.cpp index 3d9e446f..9b81da7f 100644 --- a/test/test_exec_fail1.cpp +++ b/test/test_exec_fail1.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2000. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : test failure reported via non-zero return value. Should fail // during run. @@ -29,6 +29,9 @@ int test_main( int, char* [] ) // note the name // Revision History : // // $Log$ +// Revision 1.6 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.5 2002/11/02 20:04:43 rogeeff // release 1.29.0 merged into the main trank // diff --git a/test/test_exec_fail2.cpp b/test/test_exec_fail2.cpp index 9754592c..7582c523 100644 --- a/test/test_exec_fail2.cpp +++ b/test/test_exec_fail2.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2000. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : test failures reported by differen Test Tools. // Should fail during run. @@ -39,6 +39,9 @@ int test_main( int, char *[] ) // note the name // Revision History : // // $Log$ +// Revision 1.7 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.6 2003/02/15 21:58:32 rogeeff // borland warning fix // diff --git a/test/test_exec_fail3.cpp b/test/test_exec_fail3.cpp index 82080375..1882b9f4 100644 --- a/test/test_exec_fail3.cpp +++ b/test/test_exec_fail3.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2000. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : test failures reported by BOOST_CHECK. Should fail during run. // *************************************************************************** @@ -33,6 +33,9 @@ int test_main( int, char*[] ) // note the name // Revision History : // // $Log$ +// Revision 1.7 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.6 2003/02/13 08:47:10 rogeeff // *** empty log message *** // diff --git a/test/test_exec_fail4.cpp b/test/test_exec_fail4.cpp index ec6351f4..f726c948 100644 --- a/test/test_exec_fail4.cpp +++ b/test/test_exec_fail4.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // (C) Copyright Beman Dawes 2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -9,7 +9,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : test failures reported by thgrowing the exception. // Should fail during run. @@ -34,6 +34,9 @@ int test_main( int argc, char* [] ) // note the name // Revision History : // // $Log$ +// Revision 1.8 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.7 2003/02/15 21:49:58 rogeeff // borland warning fix // diff --git a/test/test_fp_comparisons.cpp b/test/test_fp_comparisons.cpp index 4168ae2d..f002813a 100644 --- a/test/test_fp_comparisons.cpp +++ b/test/test_fp_comparisons.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests floating point comparison algorithms // *************************************************************************** @@ -18,6 +18,7 @@ #include #include using namespace boost::unit_test_framework; +using namespace boost::test_toolbox; // STL #include @@ -165,7 +166,7 @@ test_BOOST_CHECK_CLOSE_all() { double epsilon = 1e-8; CHECK_TOOL_USAGE( - BOOST_CHECK_PREDICATE( close_at_tolerance( epsilon, false ), 2, ( fp1, fp2 ) ), + BOOST_CHECK_PREDICATE( close_at_tolerance( epsilon, FPC_WEAK ), 2, ( fp1, fp2 ) ), output.is_empty() ); @@ -180,7 +181,7 @@ test_BOOST_CHECK_CLOSE_all() { epsilon = 8.1e-6; CHECK_TOOL_USAGE( - BOOST_CHECK_PREDICATE( close_at_tolerance( epsilon, false ), 2, ( fp1, fp2 ) ), + BOOST_CHECK_PREDICATE( close_at_tolerance( epsilon, FPC_WEAK ), 2, ( fp1, fp2 ) ), output.is_empty() ); @@ -209,6 +210,9 @@ init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { // Revision History : // // $Log$ +// Revision 1.3 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.2 2003/02/15 21:53:39 rogeeff // cwpro8 fix // diff --git a/test/unit_test_suite_ex_test.cpp b/test/unit_test_suite_ex_test.cpp index 6d90c8de..30b1f56c 100644 --- a/test/unit_test_suite_ex_test.cpp +++ b/test/unit_test_suite_ex_test.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001-2002. +// (C) Copyright Gennadiy Rozental 2001-2003. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -8,7 +8,7 @@ // // File : $RCSfile$ // -// Version : $Id$ +// Version : $Revision$ // // Description : tests an extentions to Unit Test Framework // *************************************************************************** @@ -110,6 +110,9 @@ init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { // Revision History : // // $Log$ +// Revision 1.10 2003/06/09 09:25:24 rogeeff +// 1.30.beta1 +// // Revision 1.9 2003/02/15 21:49:58 rogeeff // borland warning fix //