diff --git a/build/Jamfile b/build/Jamfile index d0061611..c1c203c8 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -8,7 +8,7 @@ PRG_EXEC_MON_SOURCES = TEST_EXEC_MON_SOURCES = execution_monitor test_tools - unit_test_config + unit_test_parameters unit_test_log unit_test_monitor unit_test_result @@ -19,7 +19,7 @@ TEST_EXEC_MON_SOURCES = UTF_SOURCES = execution_monitor test_tools - unit_test_config + unit_test_parameters unit_test_log unit_test_monitor unit_test_result diff --git a/build/boost_test_library.dsw b/build/boost_test_library.dsw index 76d496a2..1468235a 100644 --- a/build/boost_test_library.dsw +++ b/build/boost_test_library.dsw @@ -54,7 +54,7 @@ Package=<5> Package=<4> {{{ Begin Project Dependency - Project_Dep_Name prog_exec_monitor + Project_Dep_Name prg_exec_monitor End Project Dependency }}} @@ -69,7 +69,7 @@ Package=<5> Package=<4> {{{ Begin Project Dependency - Project_Dep_Name prog_exec_monitor + Project_Dep_Name prg_exec_monitor End Project Dependency }}} @@ -84,7 +84,7 @@ Package=<5> Package=<4> {{{ Begin Project Dependency - Project_Dep_Name prog_exec_monitor + Project_Dep_Name prg_exec_monitor End Project Dependency }}} diff --git a/build/prg_exec_fail1.dsp b/build/prg_exec_fail1.dsp index 3a82dc4e..412217b4 100644 --- a/build/prg_exec_fail1.dsp +++ b/build/prg_exec_fail1.dsp @@ -74,8 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib prg_exec_monitor.lib /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" -# SUBTRACT LINK32 /nologo +# ADD LINK32 kernel32.lib user32.lib prg_exec_monitor.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" !ENDIF diff --git a/build/test_exec_monitor.dsp b/build/test_exec_monitor.dsp index e0f51592..7ae06395 100644 --- a/build/test_exec_monitor.dsp +++ b/build/test_exec_monitor.dsp @@ -98,10 +98,6 @@ SOURCE=..\src\test_tools.cpp # End Source File # Begin Source File -SOURCE=..\src\unit_test_config.cpp -# End Source File -# Begin Source File - SOURCE=..\src\unit_test_log.cpp # End Source File # Begin Source File @@ -110,6 +106,10 @@ SOURCE=..\src\unit_test_monitor.cpp # End Source File # Begin Source File +SOURCE=..\src\unit_test_parameters.cpp +# End Source File +# Begin Source File + SOURCE=..\src\unit_test_result.cpp # End Source File # Begin Source File diff --git a/build/unit_test_framework.dsp b/build/unit_test_framework.dsp index 399989be..71e627ed 100644 --- a/build/unit_test_framework.dsp +++ b/build/unit_test_framework.dsp @@ -93,10 +93,6 @@ SOURCE=..\src\test_tools.cpp # End Source File # Begin Source File -SOURCE=..\src\unit_test_config.cpp -# End Source File -# Begin Source File - SOURCE=..\src\unit_test_log.cpp # End Source File # Begin Source File @@ -109,6 +105,10 @@ SOURCE=..\src\unit_test_monitor.cpp # End Source File # Begin Source File +SOURCE=..\src\unit_test_parameters.cpp +# End Source File +# Begin Source File + SOURCE=..\src\unit_test_result.cpp # End Source File # Begin Source File @@ -161,6 +161,10 @@ SOURCE=..\..\..\boost\test\detail\unit_test_monitor.hpp # End Source File # Begin Source File +SOURCE=..\..\..\boost\test\detail\unit_test_parameters.hpp +# End Source File +# Begin Source File + SOURCE=..\..\..\boost\test\unit_test_result.hpp # End Source File # Begin Source File diff --git a/doc/test_exec_monitor.htm b/doc/test_exec_monitor.htm index 9294ca89..32360090 100644 --- a/doc/test_exec_monitor.htm +++ b/doc/test_exec_monitor.htm @@ -101,8 +101,8 @@ src directory, compose the component:

execution_monitor.cpp
test_tools.cpp
-unit_test_config.cpp
unit_test_log.cpp
+unit_test_parameters.cpp
unit_test_monitor.cpp
unit_test_result.cpp
unit_test_suite.cpp
diff --git a/doc/unit_test_framework.htm b/doc/unit_test_framework.htm index 96fb3058..3cbf8245 100644 --- a/doc/unit_test_framework.htm +++ b/doc/unit_test_framework.htm @@ -737,7 +737,7 @@ located in the Boost Test Library src directory, compose the framework:

execution_monitor.cpp
test_tools.cpp
-unit_test_config.cpp
+unit_test_parameters.cpp
unit_test_log.cpp
unit_test_main.cpp
unit_test_monitor.cpp
diff --git a/example/unit_test_example3.cpp b/example/unit_test_example3.cpp index e3193f61..544f7d7b 100644 --- a/example/unit_test_example3.cpp +++ b/example/unit_test_example3.cpp @@ -8,7 +8,7 @@ // TEST LIB #include -#include +#include using boost::unit_test_framework::test_suite; // BOOST diff --git a/example/unit_test_example5.cpp b/example/unit_test_example5.cpp index 3b566c77..27c14072 100644 --- a/example/unit_test_example5.cpp +++ b/example/unit_test_example5.cpp @@ -8,7 +8,7 @@ // TEST LIB #include -#include +#include using boost::unit_test_framework::test_suite; // BOOST diff --git a/include/boost/test/detail/unit_test_config.hpp b/include/boost/test/detail/unit_test_config.hpp index 477817d2..85b8543f 100644 --- a/include/boost/test/detail/unit_test_config.hpp +++ b/include/boost/test/detail/unit_test_config.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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, @@ -12,29 +12,12 @@ // BOOST #include -// STL -#include - namespace boost { namespace unit_test_framework { typedef unsigned long unit_test_counter; -// framework parameters and there corresponding command-line arguments -char const* const LOGLEVEL = "BOOST_TEST_LOG_LEVEL"; // --log_level -char const* const NO_RESULT_CODE = "BOOST_TEST_RESULT_CODE"; // --result_code -char const* const RESULT_REPORT = "BOOST_TEST_REPORT_LEVEL"; // --result_report -char const* const TESTS_TO_RUN = "BOOST_TESTS_TO_RUN"; // --run_test -char const* const SAVE_TEST_PATTERN = "BOOST_TEST_SAVE_PATTERN"; // --save_pattern -char const* const BUILD_INFO = "BOOST_TEST_BUILD_INFO"; // --build_info - - -enum result_report_level { CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT }; -char const* const report_level_names[] = { "confirm" , "short" , "detailed" , "no" }; - -std::string retrieve_framework_parameter( char const* parameter_name, int* argc = NULL, char ** argv = NULL ); - namespace detail { #ifdef BOOST_NO_STD_DISTANCE @@ -58,6 +41,7 @@ using std::distance; } // namespace boost // Revision History +// 8 Aug 02 Parameters definition separated (Gennadiy Rozental) // 5 Oct 01 Initial version (Gennadiy Rozental) #endif // BOOST_UNIT_TEST_CONFIG_HPP diff --git a/include/boost/test/detail/unit_test_parameters.hpp b/include/boost/test/detail/unit_test_parameters.hpp new file mode 100644 index 00000000..3f9694af --- /dev/null +++ b/include/boost/test/detail/unit_test_parameters.hpp @@ -0,0 +1,39 @@ +// (C) Copyright Gennadiy Rozental 2001-2002. +// 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. + +#ifndef BOOST_UNIT_TEST_PARAMETERS_HPP +#define BOOST_UNIT_TEST_PARAMETERS_HPP + +// STL +#include + +namespace boost { + +namespace unit_test_framework { + +// framework parameters and there corresponding command-line arguments +char const* const LOGLEVEL = "BOOST_TEST_LOG_LEVEL"; // --log_level +char const* const NO_RESULT_CODE = "BOOST_TEST_RESULT_CODE"; // --result_code +char const* const RESULT_REPORT = "BOOST_TEST_REPORT_LEVEL"; // --result_report +char const* const TESTS_TO_RUN = "BOOST_TESTS_TO_RUN"; // --run_test +char const* const SAVE_TEST_PATTERN = "BOOST_TEST_SAVE_PATTERN"; // --save_pattern +char const* const BUILD_INFO = "BOOST_TEST_BUILD_INFO"; // --build_info + +enum result_report_level { CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT }; +char const* const report_level_names[] = { "confirm" , "short" , "detailed" , "no" }; + +std::string retrieve_framework_parameter( char const* parameter_name, int* argc = NULL, char ** argv = NULL ); + +} // namespace unit_test_framework + +} // namespace boost + +// Revision History +// 8 Aug 02 Initial version (Gennadiy Rozental) + +#endif // BOOST_UNIT_TEST_CONFIG_HPP diff --git a/include/boost/test/execution_monitor.hpp b/include/boost/test/execution_monitor.hpp index fd0d622d..750f304c 100644 --- a/include/boost/test/execution_monitor.hpp +++ b/include/boost/test/execution_monitor.hpp @@ -1,6 +1,6 @@ // Boost execution_monitor header file -------------------------------------// -// (C) Copyright Gennadiy Rozental & Beman Dawes 2001. +// (C) Copyright Beman Dawes 2001, Gennadiy Rozental 2001-2002. // 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, @@ -12,10 +12,7 @@ // named catch_exceptions() which caught otherwise uncaught C++ exceptions. // It was derived from an existing test framework by Beman Dawes. The // intent was to expand later to catch other detectable but platform dependent -// error events like Unix signals or Windows structured C exceptions, as done -// in a unit test framework by Ullrich Koethe. It was intended to support -// both the original Boost Test Library, and to support a Boost unit -// test framework to be supplied later. +// error events like Unix signals or Windows structured C exceptions. // // Requests from early adopters of the Boost Test Library included // configurable levels of error message detail, elimination of templates, diff --git a/include/boost/test/floating_point_comparison.hpp b/include/boost/test/floating_point_comparison.hpp index a493aa49..2f98e5d7 100644 --- a/include/boost/test/floating_point_comparison.hpp +++ b/include/boost/test/floating_point_comparison.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/include/boost/test/test_tools.hpp b/include/boost/test/test_tools.hpp index 423efaaa..b1b71d8e 100644 --- a/include/boost/test/test_tools.hpp +++ b/include/boost/test/test_tools.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. +// (C) Copyright Ullrich Koethe 2001, Gennadiy Rozental 2001-2002. // 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/include/boost/test/unit_test.hpp b/include/boost/test/unit_test.hpp index 605477bc..4e2c4512 100644 --- a/include/boost/test/unit_test.hpp +++ b/include/boost/test/unit_test.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/include/boost/test/unit_test_log.hpp b/include/boost/test/unit_test_log.hpp index 268480ae..1ea6726d 100644 --- a/include/boost/test/unit_test_log.hpp +++ b/include/boost/test/unit_test_log.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/include/boost/test/unit_test_result.hpp b/include/boost/test/unit_test_result.hpp index 7a923e49..8105b328 100644 --- a/include/boost/test/unit_test_result.hpp +++ b/include/boost/test/unit_test_result.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/include/boost/test/unit_test_suite.hpp b/include/boost/test/unit_test_suite.hpp index bbde1a6d..95b35c74 100644 --- a/include/boost/test/unit_test_suite.hpp +++ b/include/boost/test/unit_test_suite.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. +// (C) Copyright Ullrich Koethe 2001, Gennadiy Rozental 2001-2002. // 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/include/boost/test/unit_test_suite_ex.hpp b/include/boost/test/unit_test_suite_ex.hpp index a275b905..8a5aeab2 100644 --- a/include/boost/test/unit_test_suite_ex.hpp +++ b/include/boost/test/unit_test_suite_ex.hpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/src/cpp_main.cpp b/src/cpp_main.cpp index 1d8d88d0..d7802f51 100644 --- a/src/cpp_main.cpp +++ b/src/cpp_main.cpp @@ -1,20 +1,13 @@ -// boost/cpp_main.cpp (header or not, as you like it) ----------------------// +// Boost Test Library cpp_main.cpp ------------------------------------------// -// (C) Copyright Beman Dawes 1995-2001. 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. +// (C) Copyright Beman Dawes 1995-2001. Gennadiy Rozental 2001-2202. +// 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 updates, documentation, and revision history. -// This file may be included as a header file, or may be compiled and placed -// in a library for traditional linking. It is unusual for non-template -// non-inline implementation code to be used as a header file, but the user -// may elect to do so because header-only implementation requires no library -// build support. (Suggested by Ed Brey) - -// header dependencies are deliberately restricted to reduce coupling. - // LOCAL #include diff --git a/src/test_main.cpp b/src/test_main.cpp index 719c7e76..2042dfb1 100644 --- a/src/test_main.cpp +++ b/src/test_main.cpp @@ -10,6 +10,7 @@ // LOCAL #include // for unit test framework #include +#include // STL #include // for cout, cerr @@ -42,8 +43,7 @@ int main( int argc, char* argv[] ) { result_report_level report_level; // 1. set the log level - unit_test_log::instance().set_log_threshold_level_by_name( - retrieve_framework_parameter( LOGLEVEL, &argc, argv ).data() ); + unit_test_log::instance().set_log_threshold_level_by_name( retrieve_framework_parameter( LOGLEVEL, &argc, argv ).data() ); // 2. set the result code flag no_result_code = retrieve_framework_parameter( NO_RESULT_CODE, &argc, argv ) == "no"; diff --git a/src/test_tools.cpp b/src/test_tools.cpp index 2d06115a..da358d87 100644 --- a/src/test_tools.cpp +++ b/src/test_tools.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. +// (C) Copyright Ullrich Koethe 2001, Gennadiy Rozental 2001-2002. // 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/src/unit_test_log.cpp b/src/unit_test_log.cpp index 8d9e9ccd..c71a1880 100644 --- a/src/unit_test_log.cpp +++ b/src/unit_test_log.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/src/unit_test_main.cpp b/src/unit_test_main.cpp index 0910bfcb..407bb13c 100644 --- a/src/unit_test_main.cpp +++ b/src/unit_test_main.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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, @@ -9,7 +9,7 @@ #include // for unit_test framework #include #include -#include +#include // BOOST #include diff --git a/src/unit_test_monitor.cpp b/src/unit_test_monitor.cpp index 30ad992b..4a2ef5e5 100644 --- a/src/unit_test_monitor.cpp +++ b/src/unit_test_monitor.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001. +// (C) Copyright Ullrich Koethe 2001, Gennadiy Rozental 2001-2002. // 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/src/unit_test_config.cpp b/src/unit_test_parameters.cpp similarity index 96% rename from src/unit_test_config.cpp rename to src/unit_test_parameters.cpp index 0b745713..819c89ff 100644 --- a/src/unit_test_config.cpp +++ b/src/unit_test_parameters.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2002. // 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, @@ -7,7 +7,7 @@ // See http://www.boost.org for most recent version including documentation. // LOCAL -#include +#include //BOOST #include // for broken compiler workarounds diff --git a/src/unit_test_result.cpp b/src/unit_test_result.cpp index a63af396..a5eba3fc 100644 --- a/src/unit_test_result.cpp +++ b/src/unit_test_result.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/src/unit_test_suite.cpp b/src/unit_test_suite.cpp index 16730ca4..faf26e3b 100644 --- a/src/unit_test_suite.cpp +++ b/src/unit_test_suite.cpp @@ -1,4 +1,4 @@ -// (C) Copyright Gennadiy Rozental 2001. +// (C) Copyright Gennadiy Rozental 2001-2002. // 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/errors_handling_test.cpp b/test/errors_handling_test.cpp index 4dec3e0d..762e6d69 100644 --- a/test/errors_handling_test.cpp +++ b/test/errors_handling_test.cpp @@ -10,6 +10,7 @@ #include #include +#include using namespace boost::unit_test_framework; using namespace boost::test_toolbox; diff --git a/test/online_test.cpp b/test/online_test.cpp index 9923c8d9..440ef4ed 100644 --- a/test/online_test.cpp +++ b/test/online_test.cpp @@ -1,4 +1,4 @@ -// Boost result_report_test.cpp --------------------------------------------// +// Boost online_test.cpp ---------------------------------------------------// // (C) Copyright Gennadiy Rozental 2001. // Permission to copy, use, modify, sell and distribute this software is @@ -22,7 +22,7 @@ test_main( int argc, char * argv[] ) #include #include #include -#include +#include #include #include diff --git a/test/result_report_test.cpp b/test/result_report_test.cpp index f0ed86a7..b59fdd55 100644 --- a/test/result_report_test.cpp +++ b/test/result_report_test.cpp @@ -10,6 +10,7 @@ #include #include +#include using boost::test_toolbox::output_test_stream; using namespace boost::unit_test_framework; diff --git a/test/test_tools_test.cpp b/test/test_tools_test.cpp index 482f311f..97350f17 100644 --- a/test/test_tools_test.cpp +++ b/test/test_tools_test.cpp @@ -8,8 +8,8 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include #include +#include using namespace boost::unit_test_framework;