From 32204596c3fb89a3bc5b7615f6ab0181acafa47b Mon Sep 17 00:00:00 2001 From: Gennadiy Rozental Date: Tue, 11 May 2004 11:05:46 +0000 Subject: [PATCH] basic_cstring introduced and used everywhere class properties reworked namespace names shortened [SVN r22787] --- build/msvc71_proj/boost_test_library.sln | 18 + build/msvc71_proj/unit_test_framework.vcproj | 18 +- .../test_tools/output_test_stream.html | 10 +- .../test_tools/output_test_stream_spec.html | 6 +- .../unit_test_framework/components/index.html | 2 +- .../test_case/boost_function_test_case.html | 2 +- .../test_case/function_test_case.html | 2 +- ...arameterized_boost_function_test_case.html | 2 +- .../parameterized_function_test_case.html | 2 +- .../getting_started/const_string_test.cpp | 2 +- .../getting_started/index.html | 6 +- doc/components/unit_test_framework/index.html | 4 +- example/test_case_template_example.cpp | 2 +- example/unit_test_example1.cpp | 5 +- example/unit_test_example2.cpp | 2 +- example/unit_test_example3.cpp | 4 +- example/unit_test_example4.cpp | 2 +- example/unit_test_example5.cpp | 2 +- src/cpp_main.cpp | 13 +- src/execution_monitor.cpp | 56 +- src/supplied_log_formatters.cpp | 43 +- src/test_main.cpp | 11 +- src/test_tools.cpp | 115 ++-- src/unit_test_log.cpp | 112 ++-- src/unit_test_main.cpp | 15 +- src/unit_test_monitor.cpp | 11 +- src/unit_test_parameters.cpp | 71 ++- src/unit_test_result.cpp | 90 ++-- src/unit_test_suite.cpp | 26 +- test/Jamfile | 9 +- test/basic_cstring_test.cpp | 494 ++++++++++++++++++ test/class_properties_test.cpp | 210 ++++++++ test/custom_exception_test.cpp | 7 +- test/errors_handling_test.cpp | 19 +- test/errors_handling_test.pattern | 64 +-- test/output_test_stream_test.cpp | 13 +- test/parameterized_test_test.cpp | 9 +- test/result_report_test.cpp | 13 +- test/test_case_template_test.cpp | 7 +- test/test_fp_comparisons.cpp | 7 +- test/test_tools_test.cpp | 7 +- test/unit_test_suite_ex_test.cpp | 7 +- 42 files changed, 1158 insertions(+), 362 deletions(-) create mode 100644 test/basic_cstring_test.cpp create mode 100644 test/class_properties_test.cpp diff --git a/build/msvc71_proj/boost_test_library.sln b/build/msvc71_proj/boost_test_library.sln index acc7814b..970dfc93 100644 --- a/build/msvc71_proj/boost_test_library.sln +++ b/build/msvc71_proj/boost_test_library.sln @@ -149,6 +149,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_exception_test", "cu ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "class_properties_test", "class_properties_test.vcproj", "{84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}" + ProjectSection(ProjectDependencies) = postProject + {9466C117-7AE0-4AFD-B327-E1612568BCF1} = {9466C117-7AE0-4AFD-B327-E1612568BCF1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_cstring_test", "basic_cstring_test.vcproj", "{84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}" + ProjectSection(ProjectDependencies) = postProject + {9466C117-7AE0-4AFD-B327-E1612568BCF1} = {9466C117-7AE0-4AFD-B327-E1612568BCF1} + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -283,6 +293,14 @@ Global {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Debug.Build.0 = Debug|Win32 {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Release.ActiveCfg = Release|Win32 {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Release.Build.0 = Release|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Debug.ActiveCfg = Debug|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Debug.Build.0 = Debug|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Release.ActiveCfg = Release|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Release.Build.0 = Release|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Debug.ActiveCfg = Debug|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Debug.Build.0 = Debug|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Release.ActiveCfg = Release|Win32 + {84B8BFE6-0722-4F7A-BB34-B039BD7D6CD7}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/build/msvc71_proj/unit_test_framework.vcproj b/build/msvc71_proj/unit_test_framework.vcproj index 17ca79d9..78e5735e 100644 --- a/build/msvc71_proj/unit_test_framework.vcproj +++ b/build/msvc71_proj/unit_test_framework.vcproj @@ -42,7 +42,7 @@ Name="VCCustomBuildTool"/> @@ -350,6 +350,22 @@ + + + + + + + + + + There are two ways to use the output_test_stream tool: explicit output checks and pattern file matching.

Explicit output checks

-
using boost::test_toolbox::output_test_stream;
-	
+  
using boost::test_tools::output_test_stream;
+    
 int test_main( int, char* [] ) {
     output_test_stream output;
     int i=2;
@@ -57,8 +57,8 @@
     possible. It's not only simplify patters you compare with, but also allows you to more closely identify 
     possible source of failure.

Pattern file matching

-
using boost::test_toolbox::output_test_stream;
-	
+  
using boost::test_tools::output_test_stream;
+    
 int test_main( int argc, char* [] ) {
     output_test_stream output( "pattern_file", argc == 1);
     int i=2;
@@ -75,7 +75,7 @@
   

Even more simpler: no need to generate expected patterns. Though you need to keep the pattern file all the time somewhere around. Your testing will look like a serious of output operators followed by match pattern checks. And so on again. Try to perform checks as frequently - as possible,cause it allows you to more closely identify possible source of failure.

+ as possible,cause it allows you to more closely identify possible source of failure.

Example and test programs

output_test_stream_test
result_report_test
diff --git a/doc/components/test_tools/output_test_stream_spec.html b/doc/components/test_tools/output_test_stream_spec.html index 27bb8874..386a4482 100644 --- a/doc/components/test_tools/output_test_stream_spec.html +++ b/doc/components/test_tools/output_test_stream_spec.html @@ -9,10 +9,10 @@

Boost.Test > Components > The Test Tools > Output operations testing - > boost::test_toolbox::ostream_test_stream
+ > boost::test_tools::ostream_test_stream
Boost Test logo -

boost::test_toolbox::ostream_test_stream

-

The class boost::test_toolbox::ostream_test_stream encapsulates procedures +

boost::test_tools::ostream_test_stream

+

The class boost::test_tools::ostream_test_stream encapsulates procedures needed for effective and convenient operator<<( std::ostream&, ... ) correctness check.

Synopsis

class output_test_stream {
diff --git a/doc/components/unit_test_framework/components/index.html b/doc/components/unit_test_framework/components/index.html
index b796af62..e27c3ea8 100644
--- a/doc/components/unit_test_framework/components/index.html
+++ b/doc/components/unit_test_framework/components/index.html
@@ -13,7 +13,7 @@
 
Boost Test logo

The Unit Test Framework components

The Unit Test Framework consists of several cooperating components. All - components are located in the namespace boost::unit_test_framework.

+ components are located in the namespace boost::unit_test.