diff --git a/CppUnit/CppUnit_vs71.sln b/CppUnit/CppUnit_vs71.sln
index cdd04fc7a..1bae5201f 100644
--- a/CppUnit/CppUnit_vs71.sln
+++ b/CppUnit/CppUnit_vs71.sln
@@ -1,30 +1,30 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_VS71.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_VS71.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
- ProjectSection(ProjectDependencies) = postProject
- {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- debug_shared = debug_shared
- release_shared = release_shared
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared.ActiveCfg = debug_shared|Win32
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared.Build.0 = debug_shared|Win32
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared.ActiveCfg = release_shared|Win32
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared.Build.0 = release_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared.ActiveCfg = debug_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared.Build.0 = debug_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared.ActiveCfg = release_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared.Build.0 = release_shared|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_VS71.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_VS71.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ debug_shared = debug_shared
+ release_shared = release_shared
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared.ActiveCfg = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared.Build.0 = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared.ActiveCfg = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared.Build.0 = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared.ActiveCfg = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared.Build.0 = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared.ActiveCfg = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared.Build.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_vs71.vcproj b/CppUnit/CppUnit_vs71.vcproj
index 0422e1d25..b13bfa381 100644
--- a/CppUnit/CppUnit_vs71.vcproj
+++ b/CppUnit/CppUnit_vs71.vcproj
@@ -1,259 +1,259 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/CppUnit_vs80.sln b/CppUnit/CppUnit_vs80.sln
index 622312720..7795485b1 100644
--- a/CppUnit/CppUnit_vs80.sln
+++ b/CppUnit/CppUnit_vs80.sln
@@ -1,28 +1,28 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs80.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs80.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
- ProjectSection(ProjectDependencies) = postProject
- {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- debug_shared|Win32 = debug_shared|Win32
- release_shared|Win32 = release_shared|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.Build.0 = debug_shared|Win32
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.Build.0 = release_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.Build.0 = debug_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.Build.0 = release_shared|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs80.vcproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs80.vcproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ debug_shared|Win32 = debug_shared|Win32
+ release_shared|Win32 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {138BB448-808A-4FE5-A66D-78D1F8770F59}.release_shared|Win32.Build.0 = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}.release_shared|Win32.Build.0 = release_shared|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/CppUnit/CppUnit_vs80.vcproj b/CppUnit/CppUnit_vs80.vcproj
index 5dfcf66e5..05319679d 100644
--- a/CppUnit/CppUnit_vs80.vcproj
+++ b/CppUnit/CppUnit_vs80.vcproj
@@ -1,351 +1,351 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/Makefile b/CppUnit/Makefile
index 18c331ca9..10b7ec1c3 100644
--- a/CppUnit/Makefile
+++ b/CppUnit/Makefile
@@ -1,18 +1,18 @@
-#
-# Makefile
-#
-# $Id: //poco/1.2/CppUnit/Makefile#1 $
-#
-# Makefile for Poco CppUnit
-#
-
-include $(POCO_BASE)/build/rules/global
-
-objects = CppUnitException TestDecorator TestResult TestSuite \
- TestCase TestFailure TestRunner TextTestResult
-
-target = CppUnit
-target_version = 1
-target_libs =
-
-include $(POCO_BASE)/build/rules/lib
+#
+# Makefile
+#
+# $Id: //poco/1.2/CppUnit/Makefile#1 $
+#
+# Makefile for Poco CppUnit
+#
+
+include $(POCO_BASE)/build/rules/global
+
+objects = CppUnitException TestDecorator TestResult TestSuite \
+ TestCase TestFailure TestRunner TextTestResult
+
+target = CppUnit
+target_version = 1
+target_libs =
+
+include $(POCO_BASE)/build/rules/lib
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj b/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj
index 8d670c7de..a9c82c396 100644
--- a/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs71.vcproj
@@ -1,223 +1,223 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj b/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj
index 797d79ba7..9a0cad7fc 100644
--- a/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj
+++ b/CppUnit/WinTestRunner/WinTestRunner_vs80.vcproj
@@ -1,301 +1,301 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h b/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h
index 933918478..78e04ab39 100644
--- a/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h
+++ b/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h
@@ -1,63 +1,63 @@
-//
-// WinTestRunner.h
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h#1 $
-//
-// Application shell for CppUnit's TestRunner dialog.
-//
-
-
-#ifndef WinTestRunner_H_INCLUDED
-#define WinTestRunner_H_INCLUDED
-
-
-#if defined(WinTestRunner_EXPORTS)
- #define WinTestRunner_API __declspec(dllexport)
-#else
- #define WinTestRunner_API __declspec(dllimport)
-#endif
-
-
-#include "CppUnit/CppUnit.h"
-#include
-#include
-
-
-namespace CppUnit {
-
-
-class Test;
-
-
-class WinTestRunner_API WinTestRunner
-{
-public:
- WinTestRunner();
- ~WinTestRunner();
-
- void run();
- void addTest(Test* pTest);
-
-private:
- std::vector _tests;
-};
-
-
-class WinTestRunner_API WinTestRunnerApp: public CWinApp
- /// A simple application class that hosts the TestRunner dialog.
- /// Create a subclass and override the TestMain() method.
-{
-public:
- virtual BOOL InitInstance();
-
- virtual void TestMain() = 0;
-
- DECLARE_MESSAGE_MAP()
-};
-
-
-} // namespace CppUnit
-
-
-#endif // WinTestRunner_H_INCLUDED
-
+//
+// WinTestRunner.h
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h#1 $
+//
+// Application shell for CppUnit's TestRunner dialog.
+//
+
+
+#ifndef WinTestRunner_H_INCLUDED
+#define WinTestRunner_H_INCLUDED
+
+
+#if defined(WinTestRunner_EXPORTS)
+ #define WinTestRunner_API __declspec(dllexport)
+#else
+ #define WinTestRunner_API __declspec(dllimport)
+#endif
+
+
+#include "CppUnit/CppUnit.h"
+#include
+#include
+
+
+namespace CppUnit {
+
+
+class Test;
+
+
+class WinTestRunner_API WinTestRunner
+{
+public:
+ WinTestRunner();
+ ~WinTestRunner();
+
+ void run();
+ void addTest(Test* pTest);
+
+private:
+ std::vector _tests;
+};
+
+
+class WinTestRunner_API WinTestRunnerApp: public CWinApp
+ /// A simple application class that hosts the TestRunner dialog.
+ /// Create a subclass and override the TestMain() method.
+{
+public:
+ virtual BOOL InitInstance();
+
+ virtual void TestMain() = 0;
+
+ DECLARE_MESSAGE_MAP()
+};
+
+
+} // namespace CppUnit
+
+
+#endif // WinTestRunner_H_INCLUDED
+
diff --git a/CppUnit/WinTestRunner/res/Resource.h b/CppUnit/WinTestRunner/res/Resource.h
index c30c88ece..cd0bf3528 100644
--- a/CppUnit/WinTestRunner/res/Resource.h
+++ b/CppUnit/WinTestRunner/res/Resource.h
@@ -1,27 +1,27 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by TestRunner.rc
-//
-#define IDD_DIALOG_TESTRUNNER 129
-#define IDC_LIST 1000
-#define ID_RUN 1001
-#define ID_STOP 1002
-#define IDC_PROGRESS 1003
-#define IDC_INDICATOR 1004
-#define IDC_COMBO_TEST 1005
-#define IDC_STATIC_RUNS 1007
-#define IDC_STATIC_ERRORS 1008
-#define IDC_STATIC_FAILURES 1009
-#define IDC_EDIT_TIME 1010
-#define IDC_CHK_AUTORUN 1013
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 131
-#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 1014
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by TestRunner.rc
+//
+#define IDD_DIALOG_TESTRUNNER 129
+#define IDC_LIST 1000
+#define ID_RUN 1001
+#define ID_STOP 1002
+#define IDC_PROGRESS 1003
+#define IDC_INDICATOR 1004
+#define IDC_COMBO_TEST 1005
+#define IDC_STATIC_RUNS 1007
+#define IDC_STATIC_ERRORS 1008
+#define IDC_STATIC_FAILURES 1009
+#define IDC_EDIT_TIME 1010
+#define IDC_CHK_AUTORUN 1013
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 131
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1014
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/CppUnit/WinTestRunner/res/WinTestRunner.rc b/CppUnit/WinTestRunner/res/WinTestRunner.rc
index 71c0e8779..c4056f269 100644
--- a/CppUnit/WinTestRunner/res/WinTestRunner.rc
+++ b/CppUnit/WinTestRunner/res/WinTestRunner.rc
@@ -1,175 +1,175 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
- "#define _AFX_NO_OLE_RESOURCES\r\n"
- "#define _AFX_NO_TRACKER_RESOURCES\r\n"
- "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
- "\r\n"
- "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
- "#ifdef _WIN32\r\n"
- "LANGUAGE 9, 1\r\n"
- "#pragma code_page(1252)\r\n"
- "#endif\r\n"
- "#include ""..\\res\\WinTestRunner.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
- "#include ""afxres.rc"" // Standard components\r\n"
- "#endif\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "FileDescription", "CppUnit WinTestRunner DLL"
- VALUE "FileVersion", "1, 0, 0, 1"
- VALUE "InternalName", "WinTestRunner"
- VALUE "LegalCopyright", "Copyright (c) 2005"
- VALUE "OriginalFilename", "TestRunner.dll"
- VALUE "ProductName", "CppUnit WinTestRunner Dynamic Link Library"
- VALUE "ProductVersion", "1, 0, 0, 1"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG_TESTRUNNER DIALOGEX 0, 0, 512, 300
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "CppUnit WinTestRunner"
-FONT 8, "MS Sans Serif", 0, 0, 0x0
-BEGIN
- COMBOBOX IDC_COMBO_TEST,7,20,424,273,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
- DEFPUSHBUTTON "Run",ID_RUN,455,7,50,14
- DEFPUSHBUTTON "Stop",ID_STOP,455,24,50,14
- CONTROL "List1",IDC_LIST,"SysListView32",LVS_REPORT | WS_BORDER |
- WS_TABSTOP,7,110,498,160
- PUSHBUTTON "Close",IDOK,455,279,50,14
- LTEXT "Test Name:",IDC_STATIC,7,9,179,9
- LTEXT "Progress:",IDC_STATIC,7,55,49,9
- LTEXT "Errors and Failures:",IDC_STATIC,7,99,67,9
- LTEXT "Runs:",IDC_STATIC,457,54,26,10
- LTEXT "Failures:",IDC_STATIC,457,80,26,10
- LTEXT "Errors:",IDC_STATIC,457,67,26,10
- RTEXT "0",IDC_STATIC_RUNS,487,54,16,10
- RTEXT "0",IDC_STATIC_ERRORS,487,67,16,10
- RTEXT "0",IDC_STATIC_FAILURES,487,80,16,10
- EDITTEXT IDC_EDIT_TIME,7,281,440,12,ES_AUTOHSCROLL | ES_READONLY |
- NOT WS_BORDER
- LTEXT "",IDC_PROGRESS,7,67,424,20,SS_SUNKEN | NOT WS_VISIBLE
- CONTROL "Auto Run",IDC_CHK_AUTORUN,"Button",BS_AUTOCHECKBOX |
- BS_LEFTTEXT | WS_TABSTOP,383,38,46,10
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_DIALOG_TESTRUNNER, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 505
- TOPMARGIN, 7
- BOTTOMMARGIN, 293
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#define _AFX_NO_SPLITTER_RESOURCES
-#define _AFX_NO_OLE_RESOURCES
-#define _AFX_NO_TRACKER_RESOURCES
-#define _AFX_NO_PROPERTY_RESOURCES
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE 9, 1
-#pragma code_page(1252)
-#endif
-#include "afxres.rc" // Standard components
-#endif
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "#ifdef _WIN32\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#endif\r\n"
+ "#include ""..\\res\\WinTestRunner.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "CppUnit WinTestRunner DLL"
+ VALUE "FileVersion", "1, 0, 0, 1"
+ VALUE "InternalName", "WinTestRunner"
+ VALUE "LegalCopyright", "Copyright (c) 2005"
+ VALUE "OriginalFilename", "TestRunner.dll"
+ VALUE "ProductName", "CppUnit WinTestRunner Dynamic Link Library"
+ VALUE "ProductVersion", "1, 0, 0, 1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG_TESTRUNNER DIALOGEX 0, 0, 512, 300
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "CppUnit WinTestRunner"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ COMBOBOX IDC_COMBO_TEST,7,20,424,273,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "Run",ID_RUN,455,7,50,14
+ DEFPUSHBUTTON "Stop",ID_STOP,455,24,50,14
+ CONTROL "List1",IDC_LIST,"SysListView32",LVS_REPORT | WS_BORDER |
+ WS_TABSTOP,7,110,498,160
+ PUSHBUTTON "Close",IDOK,455,279,50,14
+ LTEXT "Test Name:",IDC_STATIC,7,9,179,9
+ LTEXT "Progress:",IDC_STATIC,7,55,49,9
+ LTEXT "Errors and Failures:",IDC_STATIC,7,99,67,9
+ LTEXT "Runs:",IDC_STATIC,457,54,26,10
+ LTEXT "Failures:",IDC_STATIC,457,80,26,10
+ LTEXT "Errors:",IDC_STATIC,457,67,26,10
+ RTEXT "0",IDC_STATIC_RUNS,487,54,16,10
+ RTEXT "0",IDC_STATIC_ERRORS,487,67,16,10
+ RTEXT "0",IDC_STATIC_FAILURES,487,80,16,10
+ EDITTEXT IDC_EDIT_TIME,7,281,440,12,ES_AUTOHSCROLL | ES_READONLY |
+ NOT WS_BORDER
+ LTEXT "",IDC_PROGRESS,7,67,424,20,SS_SUNKEN | NOT WS_VISIBLE
+ CONTROL "Auto Run",IDC_CHK_AUTORUN,"Button",BS_AUTOCHECKBOX |
+ BS_LEFTTEXT | WS_TABSTOP,383,38,46,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG_TESTRUNNER, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 505
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 293
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#endif
+#include "afxres.rc" // Standard components
+#endif
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/CppUnit/WinTestRunner/src/ActiveTest.cpp b/CppUnit/WinTestRunner/src/ActiveTest.cpp
index 3718ed01d..6c9de6479 100644
--- a/CppUnit/WinTestRunner/src/ActiveTest.cpp
+++ b/CppUnit/WinTestRunner/src/ActiveTest.cpp
@@ -1,44 +1,44 @@
-//
-// ActiveTest.cpp
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ActiveTest.cpp#1 $
-//
-
-
-#include
-#include "ActiveTest.h"
-
-
-namespace CppUnit {
-
-
-// Spawn a thread to a test
-void ActiveTest::run(TestResult* result)
-{
- CWinThread* thread;
-
- setTestResult(result);
- _runCompleted.ResetEvent();
-
- thread = AfxBeginThread(threadFunction, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
- DuplicateHandle(GetCurrentProcess(), thread->m_hThread, GetCurrentProcess(), &_threadHandle, 0, FALSE, DUPLICATE_SAME_ACCESS);
-
- thread->ResumeThread();
-}
-
-
-// Simple execution thread. Assuming that an ActiveTest instance
-// only creates one of these at a time.
-UINT ActiveTest::threadFunction(LPVOID thisInstance)
-{
- ActiveTest* test = (ActiveTest*) thisInstance;
-
- test->run();
- test->_runCompleted.SetEvent();
-
- return 0;
-}
-
-
-} // namespace CppUnit
-
+//
+// ActiveTest.cpp
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ActiveTest.cpp#1 $
+//
+
+
+#include
+#include "ActiveTest.h"
+
+
+namespace CppUnit {
+
+
+// Spawn a thread to a test
+void ActiveTest::run(TestResult* result)
+{
+ CWinThread* thread;
+
+ setTestResult(result);
+ _runCompleted.ResetEvent();
+
+ thread = AfxBeginThread(threadFunction, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
+ DuplicateHandle(GetCurrentProcess(), thread->m_hThread, GetCurrentProcess(), &_threadHandle, 0, FALSE, DUPLICATE_SAME_ACCESS);
+
+ thread->ResumeThread();
+}
+
+
+// Simple execution thread. Assuming that an ActiveTest instance
+// only creates one of these at a time.
+UINT ActiveTest::threadFunction(LPVOID thisInstance)
+{
+ ActiveTest* test = (ActiveTest*) thisInstance;
+
+ test->run();
+ test->_runCompleted.SetEvent();
+
+ return 0;
+}
+
+
+} // namespace CppUnit
+
diff --git a/CppUnit/WinTestRunner/src/ActiveTest.h b/CppUnit/WinTestRunner/src/ActiveTest.h
index 2343aecd8..60f029b57 100644
--- a/CppUnit/WinTestRunner/src/ActiveTest.h
+++ b/CppUnit/WinTestRunner/src/ActiveTest.h
@@ -1,89 +1,89 @@
-//
-// ActiveTest.h
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ActiveTest.h#1 $
-//
-
-
-#ifndef ActiveTest_INCLUDED
-#define ActiveTest_INCLUDED
-
-
-#include "CppUnit/CppUnit.h"
-#include "CppUnit/TestDecorator.h"
-#include
-
-
-namespace CppUnit {
-
-
-/* A Microsoft-specific active test
- *
- * An active test manages its own
- * thread of execution. This one
- * is very simple and only sufficient
- * for the limited use we put it through
- * in the TestRunner. It spawns a thread
- * on run (TestResult *) and signals
- * completion of the test.
- *
- * We assume that only one thread
- * will be active at once for each
- * instance.
- *
- */
-class ActiveTest: public TestDecorator
-{
-public:
- ActiveTest(Test* test);
- ~ActiveTest();
-
- void run(TestResult* result);
-
-protected:
- HANDLE _threadHandle;
- CEvent _runCompleted;
- TestResult* _currentTestResult;
-
- void run ();
- void setTestResult(TestResult* result);
- static UINT threadFunction(LPVOID thisInstance);
-};
-
-
-// Construct the active test
-inline ActiveTest::ActiveTest(Test *test): TestDecorator(test)
-{
- _currentTestResult = NULL;
- _threadHandle = INVALID_HANDLE_VALUE;
-}
-
-
-// Pend until the test has completed
-inline ActiveTest::~ActiveTest()
-{
- CSingleLock(&_runCompleted, TRUE);
- CloseHandle(_threadHandle);
-}
-
-
-// Set the test result that we are to run
-inline void ActiveTest::setTestResult(TestResult* result)
-{
- _currentTestResult = result;
-}
-
-
-// Run our test result
-inline void ActiveTest::run()
-{
- TestDecorator::run(_currentTestResult);
-}
-
-
-} // namespace CppUnit
-
-
-#endif // ActiveTest_INCLUDED
-
-
+//
+// ActiveTest.h
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ActiveTest.h#1 $
+//
+
+
+#ifndef ActiveTest_INCLUDED
+#define ActiveTest_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include "CppUnit/TestDecorator.h"
+#include
+
+
+namespace CppUnit {
+
+
+/* A Microsoft-specific active test
+ *
+ * An active test manages its own
+ * thread of execution. This one
+ * is very simple and only sufficient
+ * for the limited use we put it through
+ * in the TestRunner. It spawns a thread
+ * on run (TestResult *) and signals
+ * completion of the test.
+ *
+ * We assume that only one thread
+ * will be active at once for each
+ * instance.
+ *
+ */
+class ActiveTest: public TestDecorator
+{
+public:
+ ActiveTest(Test* test);
+ ~ActiveTest();
+
+ void run(TestResult* result);
+
+protected:
+ HANDLE _threadHandle;
+ CEvent _runCompleted;
+ TestResult* _currentTestResult;
+
+ void run ();
+ void setTestResult(TestResult* result);
+ static UINT threadFunction(LPVOID thisInstance);
+};
+
+
+// Construct the active test
+inline ActiveTest::ActiveTest(Test *test): TestDecorator(test)
+{
+ _currentTestResult = NULL;
+ _threadHandle = INVALID_HANDLE_VALUE;
+}
+
+
+// Pend until the test has completed
+inline ActiveTest::~ActiveTest()
+{
+ CSingleLock(&_runCompleted, TRUE);
+ CloseHandle(_threadHandle);
+}
+
+
+// Set the test result that we are to run
+inline void ActiveTest::setTestResult(TestResult* result)
+{
+ _currentTestResult = result;
+}
+
+
+// Run our test result
+inline void ActiveTest::run()
+{
+ TestDecorator::run(_currentTestResult);
+}
+
+
+} // namespace CppUnit
+
+
+#endif // ActiveTest_INCLUDED
+
+
diff --git a/CppUnit/WinTestRunner/src/DLLMain.cpp b/CppUnit/WinTestRunner/src/DLLMain.cpp
index 15ba83ab8..8d849ba20 100644
--- a/CppUnit/WinTestRunner/src/DLLMain.cpp
+++ b/CppUnit/WinTestRunner/src/DLLMain.cpp
@@ -1,50 +1,50 @@
-//
-// DLLMain.cpp
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/DLLMain.cpp#1 $
-//
-
-
-#include
-#include
-
-
-static AFX_EXTENSION_MODULE TestRunnerDLL = { NULL, NULL };
-
-
-extern "C" int APIENTRY
-DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
-{
- // Remove this if you use lpReserved
- UNREFERENCED_PARAMETER(lpReserved);
-
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- TRACE0("WinTestRunner.DLL Initializing\n");
-
- // Extension DLL one-time initialization
- if (!AfxInitExtensionModule(TestRunnerDLL, hInstance))
- return 0;
-
- // Insert this DLL into the resource chain
- // NOTE: If this Extension DLL is being implicitly linked to by
- // an MFC Regular DLL (such as an ActiveX Control)
- // instead of an MFC application, then you will want to
- // remove this line from DllMain and put it in a separate
- // function exported from this Extension DLL. The Regular DLL
- // that uses this Extension DLL should then explicitly call that
- // function to initialize this Extension DLL. Otherwise,
- // the CDynLinkLibrary object will not be attached to the
- // Regular DLL's resource chain, and serious problems will
- // result.
-
- new CDynLinkLibrary(TestRunnerDLL);
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- {
- TRACE0("WinTestRunner.DLL Terminating\n");
- // Terminate the library before destructors are called
- AfxTermExtensionModule(TestRunnerDLL);
- }
- return 1; // ok
-}
+//
+// DLLMain.cpp
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/DLLMain.cpp#1 $
+//
+
+
+#include
+#include
+
+
+static AFX_EXTENSION_MODULE TestRunnerDLL = { NULL, NULL };
+
+
+extern "C" int APIENTRY
+DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+ // Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved);
+
+ if (dwReason == DLL_PROCESS_ATTACH)
+ {
+ TRACE0("WinTestRunner.DLL Initializing\n");
+
+ // Extension DLL one-time initialization
+ if (!AfxInitExtensionModule(TestRunnerDLL, hInstance))
+ return 0;
+
+ // Insert this DLL into the resource chain
+ // NOTE: If this Extension DLL is being implicitly linked to by
+ // an MFC Regular DLL (such as an ActiveX Control)
+ // instead of an MFC application, then you will want to
+ // remove this line from DllMain and put it in a separate
+ // function exported from this Extension DLL. The Regular DLL
+ // that uses this Extension DLL should then explicitly call that
+ // function to initialize this Extension DLL. Otherwise,
+ // the CDynLinkLibrary object will not be attached to the
+ // Regular DLL's resource chain, and serious problems will
+ // result.
+
+ new CDynLinkLibrary(TestRunnerDLL);
+ }
+ else if (dwReason == DLL_PROCESS_DETACH)
+ {
+ TRACE0("WinTestRunner.DLL Terminating\n");
+ // Terminate the library before destructors are called
+ AfxTermExtensionModule(TestRunnerDLL);
+ }
+ return 1; // ok
+}
diff --git a/CppUnit/WinTestRunner/src/GUITestResult.cpp b/CppUnit/WinTestRunner/src/GUITestResult.cpp
index aabf09795..d444ab825 100644
--- a/CppUnit/WinTestRunner/src/GUITestResult.cpp
+++ b/CppUnit/WinTestRunner/src/GUITestResult.cpp
@@ -1,43 +1,43 @@
-//
-// GUITestResult.cpp
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/GUITestResult.cpp#1 $
-//
-
-
-#include "TestRunnerDlg.h"
-#include "GUITestResult.h"
-
-
-namespace CppUnit {
-
-
-void GUITestResult::addError(Test *test, CppUnitException *e)
-{
- ExclusiveZone zone(_syncObject);
-
- TestResult::addError(test, e);
- _runner->addError(this, test, e);
-}
-
-
-void GUITestResult::addFailure(Test *test, CppUnitException *e)
-{
- ExclusiveZone zone(_syncObject);
-
- TestResult::addFailure(test, e);
- _runner->addFailure(this, test, e);
-}
-
-
-void GUITestResult::endTest(Test *test)
-{
- ExclusiveZone zone(_syncObject);
-
- TestResult::endTest(test);
- _runner->endTest(this, test);
-}
-
-
-} // namespace CppUnit
-
+//
+// GUITestResult.cpp
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/GUITestResult.cpp#1 $
+//
+
+
+#include "TestRunnerDlg.h"
+#include "GUITestResult.h"
+
+
+namespace CppUnit {
+
+
+void GUITestResult::addError(Test *test, CppUnitException *e)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::addError(test, e);
+ _runner->addError(this, test, e);
+}
+
+
+void GUITestResult::addFailure(Test *test, CppUnitException *e)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::addFailure(test, e);
+ _runner->addFailure(this, test, e);
+}
+
+
+void GUITestResult::endTest(Test *test)
+{
+ ExclusiveZone zone(_syncObject);
+
+ TestResult::endTest(test);
+ _runner->endTest(this, test);
+}
+
+
+} // namespace CppUnit
+
diff --git a/CppUnit/WinTestRunner/src/GUITestResult.h b/CppUnit/WinTestRunner/src/GUITestResult.h
index 752c93e3e..0b5a525e5 100644
--- a/CppUnit/WinTestRunner/src/GUITestResult.h
+++ b/CppUnit/WinTestRunner/src/GUITestResult.h
@@ -1,82 +1,82 @@
-//
-// GUITestResult.h
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/GUITestResult.h#1 $
-//
-
-
-#ifndef GuiTestResult_INCLUDED
-#define GuiTestResult_INCLUDED
-
-
-#include "CppUnit/CppUnit.h"
-#include "CppUnit/TestResult.h"
-#include
-
-
-namespace CppUnit {
-
-
-class TestRunnerDlg;
-
-
-class GUITestResult: public TestResult
-{
-public:
- GUITestResult(TestRunnerDlg* runner);
- ~GUITestResult();
-
- void addError(Test* test, CppUnitException* e);
- void addFailure(Test* test, CppUnitException* e);
-
- void endTest(Test* test);
- void stop();
-
-protected:
- class LightweightSynchronizationObject: public TestResult::SynchronizationObject
- {
- public:
- void lock()
- {
- _syncObject.Lock();
- }
-
- void unlock()
- {
- _syncObject.Unlock();
- }
-
- private:
- CCriticalSection _syncObject;
- };
-
-private:
- TestRunnerDlg *_runner;
-};
-
-
-
-// Construct with lightweight synchronization
-inline GUITestResult::GUITestResult(TestRunnerDlg* runner): _runner(runner)
-{
- setSynchronizationObject(new LightweightSynchronizationObject());
-}
-
-
-// Destructor
-inline GUITestResult::~GUITestResult()
-{
-}
-
-
-// Override without protection to prevent deadlock
-inline void GUITestResult::stop()
-{
- _stop = true;
-}
-
-
-} // namespace CppUnit
-
-
-#endif // GuiTestResult_INCLUDED
+//
+// GUITestResult.h
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/GUITestResult.h#1 $
+//
+
+
+#ifndef GuiTestResult_INCLUDED
+#define GuiTestResult_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include "CppUnit/TestResult.h"
+#include
+
+
+namespace CppUnit {
+
+
+class TestRunnerDlg;
+
+
+class GUITestResult: public TestResult
+{
+public:
+ GUITestResult(TestRunnerDlg* runner);
+ ~GUITestResult();
+
+ void addError(Test* test, CppUnitException* e);
+ void addFailure(Test* test, CppUnitException* e);
+
+ void endTest(Test* test);
+ void stop();
+
+protected:
+ class LightweightSynchronizationObject: public TestResult::SynchronizationObject
+ {
+ public:
+ void lock()
+ {
+ _syncObject.Lock();
+ }
+
+ void unlock()
+ {
+ _syncObject.Unlock();
+ }
+
+ private:
+ CCriticalSection _syncObject;
+ };
+
+private:
+ TestRunnerDlg *_runner;
+};
+
+
+
+// Construct with lightweight synchronization
+inline GUITestResult::GUITestResult(TestRunnerDlg* runner): _runner(runner)
+{
+ setSynchronizationObject(new LightweightSynchronizationObject());
+}
+
+
+// Destructor
+inline GUITestResult::~GUITestResult()
+{
+}
+
+
+// Override without protection to prevent deadlock
+inline void GUITestResult::stop()
+{
+ _stop = true;
+}
+
+
+} // namespace CppUnit
+
+
+#endif // GuiTestResult_INCLUDED
diff --git a/CppUnit/WinTestRunner/src/ProgressBar.cpp b/CppUnit/WinTestRunner/src/ProgressBar.cpp
index 4ddd4c211..a846a6414 100644
--- a/CppUnit/WinTestRunner/src/ProgressBar.cpp
+++ b/CppUnit/WinTestRunner/src/ProgressBar.cpp
@@ -1,140 +1,140 @@
-//
-// ProgressBar.cpp
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.cpp#1 $
-//
-
-
-#include "ProgressBar.h"
-
-
-namespace CppUnit {
-
-
-// Paint the progress bar in response to a paint message
-void ProgressBar::paint(CDC& dc)
-{
- paintBackground (dc);
- paintStatus (dc);
-}
-
-
-// Paint the background of the progress bar region
-void ProgressBar::paintBackground (CDC& dc)
-{
- CBrush brshBackground;
- CPen penGray (PS_SOLID, 1, RGB (128, 128, 128));
- CPen penWhite (PS_SOLID, 1, RGB (255, 255, 255));
-
- VERIFY (brshBackground.CreateSolidBrush (::GetSysColor (COLOR_BTNFACE)));
-
- dc.FillRect (_bounds, &brshBackground);
-
- CPen *pOldPen;
-
- pOldPen = dc.SelectObject (&penGray);
- {
- dc.MoveTo (_bounds.left, _bounds.top);
- dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top);
-
- dc.MoveTo (_bounds.left, _bounds.top);
- dc.LineTo (_bounds.left, _bounds.top + _bounds.Height () -1);
-
- }
- dc.SelectObject (&penWhite);
- {
- dc.MoveTo (_bounds.left + _bounds.Width () -1, _bounds.top);
- dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top + _bounds.Height () -1);
-
- dc.MoveTo (_bounds.left, _bounds.top + _bounds.Height () -1);
- dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top + _bounds.Height () -1);
-
- }
- dc.SelectObject (pOldPen);
-
-}
-
-
-// Paint the actual status of the progress bar
-void ProgressBar::paintStatus (CDC& dc)
-{
- if (_progress <= 0)
- return;
-
- CBrush brshStatus;
- CRect rect (_bounds.left, _bounds.top,
- _bounds.left + _progressX, _bounds.bottom);
-
- COLORREF statusColor = getStatusColor ();
-
- VERIFY (brshStatus.CreateSolidBrush (statusColor));
-
- rect.DeflateRect (1, 1);
- dc.FillRect (rect, &brshStatus);
-
-}
-
-
-// Paint the current step
-void ProgressBar::paintStep (int startX, int endX)
-{
- // kludge: painting the whole region on each step
- _baseWindow->RedrawWindow (_bounds);
- _baseWindow->UpdateWindow ();
-
-}
-
-
-// Setup the progress bar for execution over a total number of steps
-void ProgressBar::start (int total)
-{
- _total = total;
- reset ();
-}
-
-
-// Take one step, indicating whether it was a successful step
-void ProgressBar::step (bool successful)
-{
- _progress++;
-
- int x = _progressX;
-
- _progressX = scale (_progress);
-
- if (!_error && !successful)
- {
- _error = true;
- x = 1;
- }
-
- paintStep (x, _progressX);
-
-}
-
-
-// Map from steps to display units
-int ProgressBar::scale (int value)
-{
- if (_total > 0)
- return max (1, value * (_bounds.Width () - 1) / _total);
-
- return value;
-
-}
-
-
-// Reset the progress bar
-void ProgressBar::reset ()
-{
- _progressX = 1;
- _progress = 0;
- _error = false;
-
- _baseWindow->RedrawWindow (_bounds);
- _baseWindow->UpdateWindow ();
-
-}
-
-
-} // namespace CppUnit
+//
+// ProgressBar.cpp
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.cpp#1 $
+//
+
+
+#include "ProgressBar.h"
+
+
+namespace CppUnit {
+
+
+// Paint the progress bar in response to a paint message
+void ProgressBar::paint(CDC& dc)
+{
+ paintBackground (dc);
+ paintStatus (dc);
+}
+
+
+// Paint the background of the progress bar region
+void ProgressBar::paintBackground (CDC& dc)
+{
+ CBrush brshBackground;
+ CPen penGray (PS_SOLID, 1, RGB (128, 128, 128));
+ CPen penWhite (PS_SOLID, 1, RGB (255, 255, 255));
+
+ VERIFY (brshBackground.CreateSolidBrush (::GetSysColor (COLOR_BTNFACE)));
+
+ dc.FillRect (_bounds, &brshBackground);
+
+ CPen *pOldPen;
+
+ pOldPen = dc.SelectObject (&penGray);
+ {
+ dc.MoveTo (_bounds.left, _bounds.top);
+ dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top);
+
+ dc.MoveTo (_bounds.left, _bounds.top);
+ dc.LineTo (_bounds.left, _bounds.top + _bounds.Height () -1);
+
+ }
+ dc.SelectObject (&penWhite);
+ {
+ dc.MoveTo (_bounds.left + _bounds.Width () -1, _bounds.top);
+ dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top + _bounds.Height () -1);
+
+ dc.MoveTo (_bounds.left, _bounds.top + _bounds.Height () -1);
+ dc.LineTo (_bounds.left + _bounds.Width () -1, _bounds.top + _bounds.Height () -1);
+
+ }
+ dc.SelectObject (pOldPen);
+
+}
+
+
+// Paint the actual status of the progress bar
+void ProgressBar::paintStatus (CDC& dc)
+{
+ if (_progress <= 0)
+ return;
+
+ CBrush brshStatus;
+ CRect rect (_bounds.left, _bounds.top,
+ _bounds.left + _progressX, _bounds.bottom);
+
+ COLORREF statusColor = getStatusColor ();
+
+ VERIFY (brshStatus.CreateSolidBrush (statusColor));
+
+ rect.DeflateRect (1, 1);
+ dc.FillRect (rect, &brshStatus);
+
+}
+
+
+// Paint the current step
+void ProgressBar::paintStep (int startX, int endX)
+{
+ // kludge: painting the whole region on each step
+ _baseWindow->RedrawWindow (_bounds);
+ _baseWindow->UpdateWindow ();
+
+}
+
+
+// Setup the progress bar for execution over a total number of steps
+void ProgressBar::start (int total)
+{
+ _total = total;
+ reset ();
+}
+
+
+// Take one step, indicating whether it was a successful step
+void ProgressBar::step (bool successful)
+{
+ _progress++;
+
+ int x = _progressX;
+
+ _progressX = scale (_progress);
+
+ if (!_error && !successful)
+ {
+ _error = true;
+ x = 1;
+ }
+
+ paintStep (x, _progressX);
+
+}
+
+
+// Map from steps to display units
+int ProgressBar::scale (int value)
+{
+ if (_total > 0)
+ return max (1, value * (_bounds.Width () - 1) / _total);
+
+ return value;
+
+}
+
+
+// Reset the progress bar
+void ProgressBar::reset ()
+{
+ _progressX = 1;
+ _progress = 0;
+ _error = false;
+
+ _baseWindow->RedrawWindow (_bounds);
+ _baseWindow->UpdateWindow ();
+
+}
+
+
+} // namespace CppUnit
diff --git a/CppUnit/WinTestRunner/src/ProgressBar.h b/CppUnit/WinTestRunner/src/ProgressBar.h
index 44bb7cd85..43e5a2a32 100644
--- a/CppUnit/WinTestRunner/src/ProgressBar.h
+++ b/CppUnit/WinTestRunner/src/ProgressBar.h
@@ -1,74 +1,74 @@
-//
-// ProgressBar.h
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.h#1 $
-//
-
-
-#ifndef ProgressBar_INCLUDED
-#define ProgressBar_INCLUDED
-
-
-#include "CppUnit/CppUnit.h"
-#include
-
-
-namespace CppUnit {
-
-
-/* A Simple ProgressBar for test execution display
- */
-class ProgressBar
-{
-public:
- ProgressBar(CWnd* baseWindow, CRect& bounds);
-
- void step(bool successful);
- void paint(CDC& dc);
- int scale(int value);
- void reset();
- void start(int total);
-
-protected:
- void paintBackground(CDC& dc);
- void paintStatus(CDC& dc);
- COLORREF getStatusColor();
- void paintStep(int startX, int endX);
-
- CWnd* _baseWindow;
- CRect _bounds;
-
- bool _error;
- int _total;
- int _progress;
- int _progressX;
-};
-
-
-// Construct a ProgressBar
-inline ProgressBar::ProgressBar(CWnd* baseWindow, CRect& bounds):
- _baseWindow(baseWindow),
- _bounds(bounds),
- _error(false),
- _total(0),
- _progress(0),
- _progressX(0)
-{
- WINDOWINFO wi;
- wi.cbSize = sizeof(WINDOWINFO);
- baseWindow->GetWindowInfo(&wi);
- _bounds.OffsetRect(-wi.rcClient.left, -wi.rcClient.top);
-}
-
-
-// Get the current color
-inline COLORREF ProgressBar::getStatusColor()
-{
- return _error ? RGB(255, 0, 0) : RGB(0, 255, 0);
-}
-
-
-} // namespace CppUnit
-
-
-#endif // ProgressBar_INCLUDED
+//
+// ProgressBar.h
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.h#1 $
+//
+
+
+#ifndef ProgressBar_INCLUDED
+#define ProgressBar_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include
+
+
+namespace CppUnit {
+
+
+/* A Simple ProgressBar for test execution display
+ */
+class ProgressBar
+{
+public:
+ ProgressBar(CWnd* baseWindow, CRect& bounds);
+
+ void step(bool successful);
+ void paint(CDC& dc);
+ int scale(int value);
+ void reset();
+ void start(int total);
+
+protected:
+ void paintBackground(CDC& dc);
+ void paintStatus(CDC& dc);
+ COLORREF getStatusColor();
+ void paintStep(int startX, int endX);
+
+ CWnd* _baseWindow;
+ CRect _bounds;
+
+ bool _error;
+ int _total;
+ int _progress;
+ int _progressX;
+};
+
+
+// Construct a ProgressBar
+inline ProgressBar::ProgressBar(CWnd* baseWindow, CRect& bounds):
+ _baseWindow(baseWindow),
+ _bounds(bounds),
+ _error(false),
+ _total(0),
+ _progress(0),
+ _progressX(0)
+{
+ WINDOWINFO wi;
+ wi.cbSize = sizeof(WINDOWINFO);
+ baseWindow->GetWindowInfo(&wi);
+ _bounds.OffsetRect(-wi.rcClient.left, -wi.rcClient.top);
+}
+
+
+// Get the current color
+inline COLORREF ProgressBar::getStatusColor()
+{
+ return _error ? RGB(255, 0, 0) : RGB(0, 255, 0);
+}
+
+
+} // namespace CppUnit
+
+
+#endif // ProgressBar_INCLUDED
diff --git a/CppUnit/WinTestRunner/src/SynchronizedTestResult.h b/CppUnit/WinTestRunner/src/SynchronizedTestResult.h
index 84f461547..55dc01c55 100644
--- a/CppUnit/WinTestRunner/src/SynchronizedTestResult.h
+++ b/CppUnit/WinTestRunner/src/SynchronizedTestResult.h
@@ -1,106 +1,106 @@
-#ifndef SYNCHRONIZEDTESTRESULTDECORATOR_H
-#define SYNCHRONIZEDTESTRESULTDECORATOR_H
-
-#include
-#include "TestResultDecorator.h"
-
-class SynchronizedTestResult : public TestResultDecorator
-{
-public:
- SynchronizedTestResult (TestResult *result);
- ~SynchronizedTestResult ();
-
-
- bool shouldStop ();
- void addError (Test *test, CppUnitException *e);
- void addFailure (Test *test, CppUnitException *e);
- void startTest (Test *test);
- void endTest (Test *test);
- int runTests ();
- int testErrors ();
- int testFailures ();
- bool wasSuccessful ();
- void stop ();
-
- vector& errors ();
- vector& failures ();
-
-private:
- CCriticalSection m_criticalSection;
-
-};
-
-
-// Constructor
-inline SynchronizedTestResult::SynchronizedTestResult (TestResult *result)
-: TestResultDecorator (result) {}
-
-// Destructor
-inline SynchronizedTestResult::~SynchronizedTestResult ()
-{}
-
-// Returns whether the test should stop
-inline bool SynchronizedTestResult::shouldStop ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->shouldStop (); }
-
-
-// Adds an error to the list of errors. The passed in exception
-// caused the error
-inline void SynchronizedTestResult::addError (Test *test, CppUnitException *e)
-{ CSingleLock sync (&m_criticalSection, TRUE); m_result->addError (test, e); }
-
-
-// Adds a failure to the list of failures. The passed in exception
-// caused the failure.
-inline void SynchronizedTestResult::addFailure (Test *test, CppUnitException *e)
-{ CSingleLock sync (&m_criticalSection, TRUE); m_result->addFailure (test, e); }
-
-
-// Informs the result that a test will be started.
-inline void SynchronizedTestResult::startTest (Test *test)
-{ CSingleLock sync (&m_criticalSection, TRUE); m_result->startTest (test); }
-
-
-// Informs the result that a test was completed.
-inline void SynchronizedTestResult::endTest (Test *test)
-{ CSingleLock sync (&m_criticalSection, TRUE); m_result->endTest (test); }
-
-
-// Gets the number of run tests.
-inline int SynchronizedTestResult::runTests ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->runTests (); }
-
-
-// Gets the number of detected errors.
-inline int SynchronizedTestResult::testErrors ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->testErrors (); }
-
-
-// Gets the number of detected failures.
-inline int SynchronizedTestResult::testFailures ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->testFailures (); }
-
-
-// Returns whether the entire test was successful or not.
-inline bool SynchronizedTestResult::wasSuccessful ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->wasSuccessful (); }
-
-
-// Marks that the test run should stop.
-inline void SynchronizedTestResult::stop ()
-{ CSingleLock sync (&m_criticalSection, TRUE); m_result->stop (); }
-
-
-// Returns a vector of the errors.
-inline vector& SynchronizedTestResult::errors ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->errors (); }
-
-
-// Returns a vector of the failures.
-inline vector& SynchronizedTestResult::failures ()
-{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->failures (); }
-
-
-#endif
-
-
+#ifndef SYNCHRONIZEDTESTRESULTDECORATOR_H
+#define SYNCHRONIZEDTESTRESULTDECORATOR_H
+
+#include
+#include "TestResultDecorator.h"
+
+class SynchronizedTestResult : public TestResultDecorator
+{
+public:
+ SynchronizedTestResult (TestResult *result);
+ ~SynchronizedTestResult ();
+
+
+ bool shouldStop ();
+ void addError (Test *test, CppUnitException *e);
+ void addFailure (Test *test, CppUnitException *e);
+ void startTest (Test *test);
+ void endTest (Test *test);
+ int runTests ();
+ int testErrors ();
+ int testFailures ();
+ bool wasSuccessful ();
+ void stop ();
+
+ vector& errors ();
+ vector& failures ();
+
+private:
+ CCriticalSection m_criticalSection;
+
+};
+
+
+// Constructor
+inline SynchronizedTestResult::SynchronizedTestResult (TestResult *result)
+: TestResultDecorator (result) {}
+
+// Destructor
+inline SynchronizedTestResult::~SynchronizedTestResult ()
+{}
+
+// Returns whether the test should stop
+inline bool SynchronizedTestResult::shouldStop ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->shouldStop (); }
+
+
+// Adds an error to the list of errors. The passed in exception
+// caused the error
+inline void SynchronizedTestResult::addError (Test *test, CppUnitException *e)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->addError (test, e); }
+
+
+// Adds a failure to the list of failures. The passed in exception
+// caused the failure.
+inline void SynchronizedTestResult::addFailure (Test *test, CppUnitException *e)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->addFailure (test, e); }
+
+
+// Informs the result that a test will be started.
+inline void SynchronizedTestResult::startTest (Test *test)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->startTest (test); }
+
+
+// Informs the result that a test was completed.
+inline void SynchronizedTestResult::endTest (Test *test)
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->endTest (test); }
+
+
+// Gets the number of run tests.
+inline int SynchronizedTestResult::runTests ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->runTests (); }
+
+
+// Gets the number of detected errors.
+inline int SynchronizedTestResult::testErrors ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->testErrors (); }
+
+
+// Gets the number of detected failures.
+inline int SynchronizedTestResult::testFailures ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->testFailures (); }
+
+
+// Returns whether the entire test was successful or not.
+inline bool SynchronizedTestResult::wasSuccessful ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->wasSuccessful (); }
+
+
+// Marks that the test run should stop.
+inline void SynchronizedTestResult::stop ()
+{ CSingleLock sync (&m_criticalSection, TRUE); m_result->stop (); }
+
+
+// Returns a vector of the errors.
+inline vector& SynchronizedTestResult::errors ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->errors (); }
+
+
+// Returns a vector of the failures.
+inline vector& SynchronizedTestResult::failures ()
+{ CSingleLock sync (&m_criticalSection, TRUE); return m_result->failures (); }
+
+
+#endif
+
+
diff --git a/CppUnit/WinTestRunner/src/TestResultDecorator.h b/CppUnit/WinTestRunner/src/TestResultDecorator.h
index ed2d46212..33ed48db0 100644
--- a/CppUnit/WinTestRunner/src/TestResultDecorator.h
+++ b/CppUnit/WinTestRunner/src/TestResultDecorator.h
@@ -1,102 +1,102 @@
-#ifndef CPP_UNIT_TESTRESULTDECORATOR_H
-#define CPP_UNIT_TESTRESULTDECORATOR_H
-
-#include "TestResult.h"
-
-class TestResultDecorator
-{
-public:
- TestResultDecorator (TestResult *result);
- virtual ~TestResultDecorator ();
-
-
- virtual bool shouldStop ();
- virtual void addError (Test *test, CppUnitException *e);
- virtual void addFailure (Test *test, CppUnitException *e);
- virtual void startTest (Test *test);
- virtual void endTest (Test *test);
- virtual int runTests ();
- virtual int testErrors ();
- virtual int testFailures ();
- virtual bool wasSuccessful ();
- virtual void stop ();
-
- vector& errors ();
- vector& failures ();
-
-protected:
- TestResult *m_result;
-};
-
-
-inline TestResultDecorator::TestResultDecorator (TestResult *result)
-: m_result (result) {}
-
-inline TestResultDecorator::~TestResultDecorator ()
-{}
-
-// Returns whether the test should stop
-inline bool TestResultDecorator::shouldStop ()
-{ return m_result->shouldStop (); }
-
-
-// Adds an error to the list of errors. The passed in exception
-// caused the error
-inline void TestResultDecorator::addError (Test *test, CppUnitException *e)
-{ m_result->addError (test, e); }
-
-
-// Adds a failure to the list of failures. The passed in exception
-// caused the failure.
-inline void TestResultDecorator::addFailure (Test *test, CppUnitException *e)
-{ m_result->addFailure (test, e); }
-
-
-// Informs the result that a test will be started.
-inline void TestResultDecorator::startTest (Test *test)
-{ m_result->startTest (test); }
-
-
-// Informs the result that a test was completed.
-inline void TestResultDecorator::endTest (Test *test)
-{ m_result->endTest (test); }
-
-
-// Gets the number of run tests.
-inline int TestResultDecorator::runTests ()
-{ return m_result->runTests (); }
-
-
-// Gets the number of detected errors.
-inline int TestResultDecorator::testErrors ()
-{ return m_result->testErrors (); }
-
-
-// Gets the number of detected failures.
-inline int TestResultDecorator::testFailures ()
-{ return m_result->testFailures (); }
-
-
-// Returns whether the entire test was successful or not.
-inline bool TestResultDecorator::wasSuccessful ()
-{ return m_result->wasSuccessful (); }
-
-
-// Marks that the test run should stop.
-inline void TestResultDecorator::stop ()
-{ m_result->stop (); }
-
-
-// Returns a vector of the errors.
-inline vector& TestResultDecorator::errors ()
-{ return m_result->errors (); }
-
-
-// Returns a vector of the failures.
-inline vector& TestResultDecorator::failures ()
-{ return m_result->failures (); }
-
-
-#endif
-
-
+#ifndef CPP_UNIT_TESTRESULTDECORATOR_H
+#define CPP_UNIT_TESTRESULTDECORATOR_H
+
+#include "TestResult.h"
+
+class TestResultDecorator
+{
+public:
+ TestResultDecorator (TestResult *result);
+ virtual ~TestResultDecorator ();
+
+
+ virtual bool shouldStop ();
+ virtual void addError (Test *test, CppUnitException *e);
+ virtual void addFailure (Test *test, CppUnitException *e);
+ virtual void startTest (Test *test);
+ virtual void endTest (Test *test);
+ virtual int runTests ();
+ virtual int testErrors ();
+ virtual int testFailures ();
+ virtual bool wasSuccessful ();
+ virtual void stop ();
+
+ vector& errors ();
+ vector& failures ();
+
+protected:
+ TestResult *m_result;
+};
+
+
+inline TestResultDecorator::TestResultDecorator (TestResult *result)
+: m_result (result) {}
+
+inline TestResultDecorator::~TestResultDecorator ()
+{}
+
+// Returns whether the test should stop
+inline bool TestResultDecorator::shouldStop ()
+{ return m_result->shouldStop (); }
+
+
+// Adds an error to the list of errors. The passed in exception
+// caused the error
+inline void TestResultDecorator::addError (Test *test, CppUnitException *e)
+{ m_result->addError (test, e); }
+
+
+// Adds a failure to the list of failures. The passed in exception
+// caused the failure.
+inline void TestResultDecorator::addFailure (Test *test, CppUnitException *e)
+{ m_result->addFailure (test, e); }
+
+
+// Informs the result that a test will be started.
+inline void TestResultDecorator::startTest (Test *test)
+{ m_result->startTest (test); }
+
+
+// Informs the result that a test was completed.
+inline void TestResultDecorator::endTest (Test *test)
+{ m_result->endTest (test); }
+
+
+// Gets the number of run tests.
+inline int TestResultDecorator::runTests ()
+{ return m_result->runTests (); }
+
+
+// Gets the number of detected errors.
+inline int TestResultDecorator::testErrors ()
+{ return m_result->testErrors (); }
+
+
+// Gets the number of detected failures.
+inline int TestResultDecorator::testFailures ()
+{ return m_result->testFailures (); }
+
+
+// Returns whether the entire test was successful or not.
+inline bool TestResultDecorator::wasSuccessful ()
+{ return m_result->wasSuccessful (); }
+
+
+// Marks that the test run should stop.
+inline void TestResultDecorator::stop ()
+{ m_result->stop (); }
+
+
+// Returns a vector of the errors.
+inline vector& TestResultDecorator::errors ()
+{ return m_result->errors (); }
+
+
+// Returns a vector of the failures.
+inline vector& TestResultDecorator::failures ()
+{ return m_result->failures (); }
+
+
+#endif
+
+
diff --git a/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp b/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp
index 2c93fcd33..4b8663367 100644
--- a/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp
+++ b/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp
@@ -1,424 +1,424 @@
-//
-// TestRunnerDlg.cpp
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp#1 $
-//
-
-
-#include
-#include
-#include
-#include
-#include "TestRunnerDlg.h"
-#include "ActiveTest.h"
-#include "GUITestResult.h"
-#include "ProgressBar.h"
-#include "CppUnit/TestSuite.h"
-#include "TestRunnerDlg.h"
-
-
-namespace CppUnit {
-
-
-TestRunnerDlg::TestRunnerDlg(CWnd* pParent): CDialog(TestRunnerDlg::IDD, pParent)
-{
- //{{AFX_DATA_INIT(TestRunnerDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
-
- _testsProgress = 0;
- _selectedTest = 0;
-}
-
-
-void TestRunnerDlg::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(TestRunnerDlg)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP(TestRunnerDlg, CDialog)
- //{{AFX_MSG_MAP(TestRunnerDlg)
- ON_BN_CLICKED(ID_RUN, OnRun)
- ON_BN_CLICKED(ID_STOP, OnStop)
- ON_CBN_SELCHANGE(IDC_COMBO_TEST, OnSelchangeComboTest)
- ON_BN_CLICKED(IDC_CHK_AUTORUN, OnBnClickedAutorun)
- ON_WM_PAINT()
- //}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-
-
-BOOL TestRunnerDlg::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
- CComboBox *comboBox = (CComboBox *)GetDlgItem (IDC_COMBO_TEST);
-
- ASSERT (listCtrl);
- ASSERT (comboBox);
-
- CString title;
- GetWindowText(title);
-#if defined(_DEBUG)
- title.Append(" [debug]");
-#else
- title.Append(" [release]");
-#endif
- SetWindowText(title);
-
- listCtrl->InsertColumn (0,"Type", LVCFMT_LEFT, 16 + listCtrl->GetStringWidth ("Type"), 1);
- listCtrl->InsertColumn (1,"Name", LVCFMT_LEFT, 16 * listCtrl->GetStringWidth ("X"), 2);
- listCtrl->InsertColumn (2,"Failed Condition", LVCFMT_LEFT, 24 * listCtrl->GetStringWidth ("M"), 3);
- listCtrl->InsertColumn (3,"Line", LVCFMT_LEFT, 16 + listCtrl->GetStringWidth ("0000"), 4);
- listCtrl->InsertColumn (4,"File Name", LVCFMT_LEFT, 36 * listCtrl->GetStringWidth ("M"), 5);
-
- int numberOfCases = 0;
-
- CWinApp* pApp = AfxGetApp();
- CString lastTestCS = pApp->GetProfileString("Tests", "lastTest");
- std::string lastTest((LPCSTR) lastTestCS);
- int sel = -1;
- for (std::vector::iterator it = _tests.begin (); it != _tests.end (); ++it)
- {
- std::string cbName(it->level*4, ' ');
- cbName.append(it->pTest->toString());
- comboBox->AddString (cbName.c_str ());
- if (sel < 0)
- {
- if (lastTest.empty() || lastTest == it->pTest->toString())
- {
- _selectedTest = it->pTest;
- sel = numberOfCases;
- }
- }
- numberOfCases++;
- }
-
- if (numberOfCases > 0)
- {
- if (sel < 0)
- {
- _selectedTest = _tests[0].pTest;
- sel = 0;
- }
- comboBox->SetCurSel (sel);
- }
- else
- {
- beRunDisabled ();
- }
- CWnd *pProgress = GetDlgItem(IDC_PROGRESS);
- CRect rect;
- pProgress->GetWindowRect(&rect);
- _testsProgress = new ProgressBar (this, rect);
-
- CButton* autoRunBtn = (CButton*) GetDlgItem(IDC_CHK_AUTORUN);
- autoRunBtn->SetCheck(pApp->GetProfileInt("Tests", "autoRun", BST_UNCHECKED));
-
- reset ();
-
- if (autoRunBtn->GetCheck() == BST_CHECKED)
- {
- OnRun();
- }
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
-}
-
-
-TestRunnerDlg::~TestRunnerDlg ()
-{
- freeState ();
- delete _testsProgress;
-}
-
-
-void TestRunnerDlg::OnRun()
-{
- if (_selectedTest == 0)
- return;
-
- freeState ();
- reset ();
-
- beRunning ();
-
- int numberOfTests = _selectedTest->countTestCases ();
-
- _testsProgress->start (numberOfTests);
-
- _result = new GUITestResult ((TestRunnerDlg *)this);
- _activeTest = new ActiveTest (_selectedTest);
-
- _testStartTime = timeGetTime ();
-
- _activeTest->run (_result);
-
- _testEndTime = timeGetTime ();
-
-}
-
-
-void TestRunnerDlg::addListEntry(const std::string& type, TestResult *result, Test *test, CppUnitException *e)
-{
- char stage [80];
- LV_ITEM lvi;
- CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
- int currentEntry = result->testErrors () + result->testFailures () -1;
-
- sprintf (stage, "%s", type.c_str ());
-
- lvi.mask = LVIF_TEXT;
- lvi.iItem = currentEntry;
- lvi.iSubItem = 0;
- lvi.pszText = stage;
- lvi.iImage = 0;
- lvi.stateMask = 0;
- lvi.state = 0;
-
- listCtrl->InsertItem (&lvi);
-
- // Set class string
- listCtrl->SetItemText (currentEntry, 1, test->toString ().c_str ());
-
- // Set the asserted text
- listCtrl->SetItemText(currentEntry, 2, e->what ());
-
- // Set the line number
- if (e->lineNumber () == CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
- sprintf (stage, "");
- else
- sprintf (stage, "%ld", e->lineNumber ());
-
- listCtrl->SetItemText(currentEntry, 3, stage);
-
- // Set the file name
- listCtrl->SetItemText(currentEntry, 4, e->fileName ().c_str ());
-
- listCtrl->RedrawItems (currentEntry, currentEntry);
- listCtrl->UpdateWindow ();
-
-}
-
-
-void TestRunnerDlg::addError (TestResult *result, Test *test, CppUnitException *e)
-{
- addListEntry ("Error", result, test, e);
- _errors++;
-
- updateCountsDisplay ();
-
-}
-
-
-void TestRunnerDlg::addFailure (TestResult *result, Test *test, CppUnitException *e)
-{
- addListEntry ("Failure", result, test, e);
- _failures++;
-
- updateCountsDisplay ();
-
-}
-
-
-void TestRunnerDlg::endTest (TestResult *result, Test *test)
-{
- if (_selectedTest == 0)
- return;
-
- _testsRun++;
- updateCountsDisplay ();
- _testsProgress->step (_failures == 0 && _errors == 0);
-
- _testEndTime = timeGetTime ();
-
- updateCountsDisplay ();
-
- if (_testsRun >= _selectedTest->countTestCases ())
- beIdle ();
-}
-
-
-void TestRunnerDlg::beRunning ()
-{
- CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
- CButton *closeButton = (CButton *)GetDlgItem (IDOK);
-
- runButton->EnableWindow (FALSE);
- closeButton->EnableWindow (FALSE);
-
-}
-
-
-void TestRunnerDlg::beIdle ()
-{
- CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
- CButton *closeButton = (CButton *)GetDlgItem (IDOK);
-
- runButton->EnableWindow (TRUE);
- closeButton->EnableWindow (TRUE);
-
-}
-
-
-void TestRunnerDlg::beRunDisabled ()
-{
- CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
- CButton *closeButton = (CButton *)GetDlgItem (IDOK);
- CButton *stopButton = (CButton *)GetDlgItem (ID_STOP);
-
- runButton->EnableWindow (FALSE);
- stopButton->EnableWindow (FALSE);
- closeButton->EnableWindow (TRUE);
-
-}
-
-
-void TestRunnerDlg::freeState ()
-{
- delete _activeTest;
- delete _result;
-
-}
-
-
-void TestRunnerDlg::reset ()
-{
- _testsRun = 0;
- _errors = 0;
- _failures = 0;
- _testEndTime = _testStartTime;
-
- updateCountsDisplay ();
-
- _activeTest = 0;
- _result = 0;
-
- CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
-
- listCtrl->DeleteAllItems ();
- _testsProgress->reset ();
-
-}
-
-
-void TestRunnerDlg::updateCountsDisplay ()
-{
- CStatic *statTestsRun = (CStatic *)GetDlgItem (IDC_STATIC_RUNS);
- CStatic *statErrors = (CStatic *)GetDlgItem (IDC_STATIC_ERRORS);
- CStatic *statFailures = (CStatic *)GetDlgItem (IDC_STATIC_FAILURES);
- CEdit *editTime = (CEdit *)GetDlgItem (IDC_EDIT_TIME);
-
- CString argumentString;
-
- argumentString.Format ("%d", _testsRun);
- statTestsRun ->SetWindowText (argumentString);
-
- argumentString.Format ("%d", _errors);
- statErrors ->SetWindowText (argumentString);
-
- argumentString.Format ("%d", _failures);
- statFailures ->SetWindowText (argumentString);
-
- argumentString.Format ("Execution time: %3.3lf seconds", (_testEndTime - _testStartTime) / 1000.0);
- editTime ->SetWindowText (argumentString);
-
-
-}
-
-
-void TestRunnerDlg::OnStop()
-{
- if (_result)
- _result->stop ();
-
- beIdle ();
-
-}
-
-
-void TestRunnerDlg::OnOK()
-{
- if (_result)
- _result->stop ();
-
- CDialog::OnOK ();
-}
-
-
-void TestRunnerDlg::OnSelchangeComboTest()
-{
- CComboBox *testsSelection = (CComboBox *)GetDlgItem (IDC_COMBO_TEST);
-
- int currentSelection = testsSelection->GetCurSel ();
-
- if (currentSelection >= 0 && currentSelection < _tests.size ())
- {
- _selectedTest = (_tests.begin () + currentSelection)->pTest;
- beIdle ();
- CWinApp* pApp = AfxGetApp();
- pApp->WriteProfileString("Tests", "lastTest", _selectedTest->toString().c_str());
- }
- else
- {
- _selectedTest = 0;
- beRunDisabled ();
-
- }
-
- freeState ();
- reset ();
-
-}
-
-
-void TestRunnerDlg::OnBnClickedAutorun()
-{
- CButton *autoRunBtn = (CButton *)GetDlgItem (IDC_CHK_AUTORUN);
- CWinApp* pApp = AfxGetApp();
- pApp->WriteProfileInt("Tests", "autoRun", autoRunBtn->GetCheck());
-}
-
-
-void TestRunnerDlg::OnPaint()
-{
- CPaintDC dc (this);
-
- _testsProgress->paint (dc);
-}
-
-
-void TestRunnerDlg::setTests(const std::vector& tests)
-{
- _tests.clear();
- for (std::vector::const_iterator it = tests.begin(); it != tests.end(); ++it)
- {
- addTest(*it, 0);
- }
-}
-
-
-void TestRunnerDlg::addTest(Test* pTest, int level)
-{
- TestInfo ti;
- ti.pTest = pTest;
- ti.level = level;
- _tests.push_back(ti);
- TestSuite* pSuite = dynamic_cast(pTest);
- if (pSuite)
- {
- const std::vector& tests = pSuite->tests();
- for (std::vector::const_iterator it = tests.begin(); it != tests.end(); ++it)
- {
- addTest(*it, level + 1);
- }
- }
-}
-
-
-} // namespace CppUnit
+//
+// TestRunnerDlg.cpp
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp#1 $
+//
+
+
+#include
+#include
+#include
+#include
+#include "TestRunnerDlg.h"
+#include "ActiveTest.h"
+#include "GUITestResult.h"
+#include "ProgressBar.h"
+#include "CppUnit/TestSuite.h"
+#include "TestRunnerDlg.h"
+
+
+namespace CppUnit {
+
+
+TestRunnerDlg::TestRunnerDlg(CWnd* pParent): CDialog(TestRunnerDlg::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(TestRunnerDlg)
+ // NOTE: the ClassWizard will add member initialization here
+ //}}AFX_DATA_INIT
+
+ _testsProgress = 0;
+ _selectedTest = 0;
+}
+
+
+void TestRunnerDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(TestRunnerDlg)
+ // NOTE: the ClassWizard will add DDX and DDV calls here
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(TestRunnerDlg, CDialog)
+ //{{AFX_MSG_MAP(TestRunnerDlg)
+ ON_BN_CLICKED(ID_RUN, OnRun)
+ ON_BN_CLICKED(ID_STOP, OnStop)
+ ON_CBN_SELCHANGE(IDC_COMBO_TEST, OnSelchangeComboTest)
+ ON_BN_CLICKED(IDC_CHK_AUTORUN, OnBnClickedAutorun)
+ ON_WM_PAINT()
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+
+BOOL TestRunnerDlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
+ CComboBox *comboBox = (CComboBox *)GetDlgItem (IDC_COMBO_TEST);
+
+ ASSERT (listCtrl);
+ ASSERT (comboBox);
+
+ CString title;
+ GetWindowText(title);
+#if defined(_DEBUG)
+ title.Append(" [debug]");
+#else
+ title.Append(" [release]");
+#endif
+ SetWindowText(title);
+
+ listCtrl->InsertColumn (0,"Type", LVCFMT_LEFT, 16 + listCtrl->GetStringWidth ("Type"), 1);
+ listCtrl->InsertColumn (1,"Name", LVCFMT_LEFT, 16 * listCtrl->GetStringWidth ("X"), 2);
+ listCtrl->InsertColumn (2,"Failed Condition", LVCFMT_LEFT, 24 * listCtrl->GetStringWidth ("M"), 3);
+ listCtrl->InsertColumn (3,"Line", LVCFMT_LEFT, 16 + listCtrl->GetStringWidth ("0000"), 4);
+ listCtrl->InsertColumn (4,"File Name", LVCFMT_LEFT, 36 * listCtrl->GetStringWidth ("M"), 5);
+
+ int numberOfCases = 0;
+
+ CWinApp* pApp = AfxGetApp();
+ CString lastTestCS = pApp->GetProfileString("Tests", "lastTest");
+ std::string lastTest((LPCSTR) lastTestCS);
+ int sel = -1;
+ for (std::vector::iterator it = _tests.begin (); it != _tests.end (); ++it)
+ {
+ std::string cbName(it->level*4, ' ');
+ cbName.append(it->pTest->toString());
+ comboBox->AddString (cbName.c_str ());
+ if (sel < 0)
+ {
+ if (lastTest.empty() || lastTest == it->pTest->toString())
+ {
+ _selectedTest = it->pTest;
+ sel = numberOfCases;
+ }
+ }
+ numberOfCases++;
+ }
+
+ if (numberOfCases > 0)
+ {
+ if (sel < 0)
+ {
+ _selectedTest = _tests[0].pTest;
+ sel = 0;
+ }
+ comboBox->SetCurSel (sel);
+ }
+ else
+ {
+ beRunDisabled ();
+ }
+ CWnd *pProgress = GetDlgItem(IDC_PROGRESS);
+ CRect rect;
+ pProgress->GetWindowRect(&rect);
+ _testsProgress = new ProgressBar (this, rect);
+
+ CButton* autoRunBtn = (CButton*) GetDlgItem(IDC_CHK_AUTORUN);
+ autoRunBtn->SetCheck(pApp->GetProfileInt("Tests", "autoRun", BST_UNCHECKED));
+
+ reset ();
+
+ if (autoRunBtn->GetCheck() == BST_CHECKED)
+ {
+ OnRun();
+ }
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+
+TestRunnerDlg::~TestRunnerDlg ()
+{
+ freeState ();
+ delete _testsProgress;
+}
+
+
+void TestRunnerDlg::OnRun()
+{
+ if (_selectedTest == 0)
+ return;
+
+ freeState ();
+ reset ();
+
+ beRunning ();
+
+ int numberOfTests = _selectedTest->countTestCases ();
+
+ _testsProgress->start (numberOfTests);
+
+ _result = new GUITestResult ((TestRunnerDlg *)this);
+ _activeTest = new ActiveTest (_selectedTest);
+
+ _testStartTime = timeGetTime ();
+
+ _activeTest->run (_result);
+
+ _testEndTime = timeGetTime ();
+
+}
+
+
+void TestRunnerDlg::addListEntry(const std::string& type, TestResult *result, Test *test, CppUnitException *e)
+{
+ char stage [80];
+ LV_ITEM lvi;
+ CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
+ int currentEntry = result->testErrors () + result->testFailures () -1;
+
+ sprintf (stage, "%s", type.c_str ());
+
+ lvi.mask = LVIF_TEXT;
+ lvi.iItem = currentEntry;
+ lvi.iSubItem = 0;
+ lvi.pszText = stage;
+ lvi.iImage = 0;
+ lvi.stateMask = 0;
+ lvi.state = 0;
+
+ listCtrl->InsertItem (&lvi);
+
+ // Set class string
+ listCtrl->SetItemText (currentEntry, 1, test->toString ().c_str ());
+
+ // Set the asserted text
+ listCtrl->SetItemText(currentEntry, 2, e->what ());
+
+ // Set the line number
+ if (e->lineNumber () == CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
+ sprintf (stage, "");
+ else
+ sprintf (stage, "%ld", e->lineNumber ());
+
+ listCtrl->SetItemText(currentEntry, 3, stage);
+
+ // Set the file name
+ listCtrl->SetItemText(currentEntry, 4, e->fileName ().c_str ());
+
+ listCtrl->RedrawItems (currentEntry, currentEntry);
+ listCtrl->UpdateWindow ();
+
+}
+
+
+void TestRunnerDlg::addError (TestResult *result, Test *test, CppUnitException *e)
+{
+ addListEntry ("Error", result, test, e);
+ _errors++;
+
+ updateCountsDisplay ();
+
+}
+
+
+void TestRunnerDlg::addFailure (TestResult *result, Test *test, CppUnitException *e)
+{
+ addListEntry ("Failure", result, test, e);
+ _failures++;
+
+ updateCountsDisplay ();
+
+}
+
+
+void TestRunnerDlg::endTest (TestResult *result, Test *test)
+{
+ if (_selectedTest == 0)
+ return;
+
+ _testsRun++;
+ updateCountsDisplay ();
+ _testsProgress->step (_failures == 0 && _errors == 0);
+
+ _testEndTime = timeGetTime ();
+
+ updateCountsDisplay ();
+
+ if (_testsRun >= _selectedTest->countTestCases ())
+ beIdle ();
+}
+
+
+void TestRunnerDlg::beRunning ()
+{
+ CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
+ CButton *closeButton = (CButton *)GetDlgItem (IDOK);
+
+ runButton->EnableWindow (FALSE);
+ closeButton->EnableWindow (FALSE);
+
+}
+
+
+void TestRunnerDlg::beIdle ()
+{
+ CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
+ CButton *closeButton = (CButton *)GetDlgItem (IDOK);
+
+ runButton->EnableWindow (TRUE);
+ closeButton->EnableWindow (TRUE);
+
+}
+
+
+void TestRunnerDlg::beRunDisabled ()
+{
+ CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
+ CButton *closeButton = (CButton *)GetDlgItem (IDOK);
+ CButton *stopButton = (CButton *)GetDlgItem (ID_STOP);
+
+ runButton->EnableWindow (FALSE);
+ stopButton->EnableWindow (FALSE);
+ closeButton->EnableWindow (TRUE);
+
+}
+
+
+void TestRunnerDlg::freeState ()
+{
+ delete _activeTest;
+ delete _result;
+
+}
+
+
+void TestRunnerDlg::reset ()
+{
+ _testsRun = 0;
+ _errors = 0;
+ _failures = 0;
+ _testEndTime = _testStartTime;
+
+ updateCountsDisplay ();
+
+ _activeTest = 0;
+ _result = 0;
+
+ CListCtrl *listCtrl = (CListCtrl *)GetDlgItem (IDC_LIST);
+
+ listCtrl->DeleteAllItems ();
+ _testsProgress->reset ();
+
+}
+
+
+void TestRunnerDlg::updateCountsDisplay ()
+{
+ CStatic *statTestsRun = (CStatic *)GetDlgItem (IDC_STATIC_RUNS);
+ CStatic *statErrors = (CStatic *)GetDlgItem (IDC_STATIC_ERRORS);
+ CStatic *statFailures = (CStatic *)GetDlgItem (IDC_STATIC_FAILURES);
+ CEdit *editTime = (CEdit *)GetDlgItem (IDC_EDIT_TIME);
+
+ CString argumentString;
+
+ argumentString.Format ("%d", _testsRun);
+ statTestsRun ->SetWindowText (argumentString);
+
+ argumentString.Format ("%d", _errors);
+ statErrors ->SetWindowText (argumentString);
+
+ argumentString.Format ("%d", _failures);
+ statFailures ->SetWindowText (argumentString);
+
+ argumentString.Format ("Execution time: %3.3lf seconds", (_testEndTime - _testStartTime) / 1000.0);
+ editTime ->SetWindowText (argumentString);
+
+
+}
+
+
+void TestRunnerDlg::OnStop()
+{
+ if (_result)
+ _result->stop ();
+
+ beIdle ();
+
+}
+
+
+void TestRunnerDlg::OnOK()
+{
+ if (_result)
+ _result->stop ();
+
+ CDialog::OnOK ();
+}
+
+
+void TestRunnerDlg::OnSelchangeComboTest()
+{
+ CComboBox *testsSelection = (CComboBox *)GetDlgItem (IDC_COMBO_TEST);
+
+ int currentSelection = testsSelection->GetCurSel ();
+
+ if (currentSelection >= 0 && currentSelection < _tests.size ())
+ {
+ _selectedTest = (_tests.begin () + currentSelection)->pTest;
+ beIdle ();
+ CWinApp* pApp = AfxGetApp();
+ pApp->WriteProfileString("Tests", "lastTest", _selectedTest->toString().c_str());
+ }
+ else
+ {
+ _selectedTest = 0;
+ beRunDisabled ();
+
+ }
+
+ freeState ();
+ reset ();
+
+}
+
+
+void TestRunnerDlg::OnBnClickedAutorun()
+{
+ CButton *autoRunBtn = (CButton *)GetDlgItem (IDC_CHK_AUTORUN);
+ CWinApp* pApp = AfxGetApp();
+ pApp->WriteProfileInt("Tests", "autoRun", autoRunBtn->GetCheck());
+}
+
+
+void TestRunnerDlg::OnPaint()
+{
+ CPaintDC dc (this);
+
+ _testsProgress->paint (dc);
+}
+
+
+void TestRunnerDlg::setTests(const std::vector& tests)
+{
+ _tests.clear();
+ for (std::vector::const_iterator it = tests.begin(); it != tests.end(); ++it)
+ {
+ addTest(*it, 0);
+ }
+}
+
+
+void TestRunnerDlg::addTest(Test* pTest, int level)
+{
+ TestInfo ti;
+ ti.pTest = pTest;
+ ti.level = level;
+ _tests.push_back(ti);
+ TestSuite* pSuite = dynamic_cast(pTest);
+ if (pSuite)
+ {
+ const std::vector& tests = pSuite->tests();
+ for (std::vector::const_iterator it = tests.begin(); it != tests.end(); ++it)
+ {
+ addTest(*it, level + 1);
+ }
+ }
+}
+
+
+} // namespace CppUnit
diff --git a/CppUnit/WinTestRunner/src/TestRunnerDlg.h b/CppUnit/WinTestRunner/src/TestRunnerDlg.h
index fea02a926..18d8adfef 100644
--- a/CppUnit/WinTestRunner/src/TestRunnerDlg.h
+++ b/CppUnit/WinTestRunner/src/TestRunnerDlg.h
@@ -1,92 +1,92 @@
-//
-// TestRunnerDlg.h
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/TestRunnerDlg.h#1 $
-//
-
-
-#ifndef TestRunnerDlg_INCLUDED
-#define TestRunnerDlg_INCLUDED
-
-
-#include "CppUnit/CppUnit.h"
-#include "CppUnit/CppUnitException.h"
-#include "ActiveTest.h"
-#include
-#include "../res/Resource.h"
-#include
-#include "afxwin.h"
-
-
-namespace CppUnit {
-
-
-class ProgressBar;
-
-
-class TestRunnerDlg: public CDialog
-{
-public:
- TestRunnerDlg(CWnd* pParent = NULL);
- ~TestRunnerDlg();
-
- void setTests(const std::vector& tests);
-
- void addError(TestResult* result, Test* test, CppUnitException* e);
- void addFailure(TestResult* result, Test* test, CppUnitException* e);
- void endTest(TestResult* result, Test* test);
-
- //{{AFX_DATA(TestRunnerDlg)
- enum { IDD = IDD_DIALOG_TESTRUNNER };
- // NOTE: the ClassWizard will add data members here
- //}}AFX_DATA
-
- //{{AFX_VIRTUAL(TestRunnerDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
-protected:
- //{{AFX_MSG(TestRunnerDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnRun();
- afx_msg void OnStop();
- virtual void OnOK();
- afx_msg void OnSelchangeComboTest();
- afx_msg void OnBnClickedAutorun();
- afx_msg void OnPaint();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- void addListEntry(const std::string& type, TestResult* result, Test* test, CppUnitException* e);
- void beIdle();
- void beRunning();
- void beRunDisabled();
- void reset();
- void freeState();
- void updateCountsDisplay();
- void addTest(Test* pTest, int level);
-
- struct TestInfo
- {
- Test* pTest;
- int level;
- };
- std::vector _tests;
- ProgressBar* _testsProgress;
- Test* _selectedTest;
- ActiveTest* _activeTest;
- TestResult* _result;
- int _testsRun;
- int _errors;
- int _failures;
- DWORD _testStartTime;
- DWORD _testEndTime;
-};
-
-
-} // namespace CppUnit
-
-
-#endif // TestRunnerDlg_INCLUDED
-
+//
+// TestRunnerDlg.h
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/TestRunnerDlg.h#1 $
+//
+
+
+#ifndef TestRunnerDlg_INCLUDED
+#define TestRunnerDlg_INCLUDED
+
+
+#include "CppUnit/CppUnit.h"
+#include "CppUnit/CppUnitException.h"
+#include "ActiveTest.h"
+#include
+#include "../res/Resource.h"
+#include
+#include "afxwin.h"
+
+
+namespace CppUnit {
+
+
+class ProgressBar;
+
+
+class TestRunnerDlg: public CDialog
+{
+public:
+ TestRunnerDlg(CWnd* pParent = NULL);
+ ~TestRunnerDlg();
+
+ void setTests(const std::vector& tests);
+
+ void addError(TestResult* result, Test* test, CppUnitException* e);
+ void addFailure(TestResult* result, Test* test, CppUnitException* e);
+ void endTest(TestResult* result, Test* test);
+
+ //{{AFX_DATA(TestRunnerDlg)
+ enum { IDD = IDD_DIALOG_TESTRUNNER };
+ // NOTE: the ClassWizard will add data members here
+ //}}AFX_DATA
+
+ //{{AFX_VIRTUAL(TestRunnerDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+protected:
+ //{{AFX_MSG(TestRunnerDlg)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnRun();
+ afx_msg void OnStop();
+ virtual void OnOK();
+ afx_msg void OnSelchangeComboTest();
+ afx_msg void OnBnClickedAutorun();
+ afx_msg void OnPaint();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+ void addListEntry(const std::string& type, TestResult* result, Test* test, CppUnitException* e);
+ void beIdle();
+ void beRunning();
+ void beRunDisabled();
+ void reset();
+ void freeState();
+ void updateCountsDisplay();
+ void addTest(Test* pTest, int level);
+
+ struct TestInfo
+ {
+ Test* pTest;
+ int level;
+ };
+ std::vector _tests;
+ ProgressBar* _testsProgress;
+ Test* _selectedTest;
+ ActiveTest* _activeTest;
+ TestResult* _result;
+ int _testsRun;
+ int _errors;
+ int _failures;
+ DWORD _testStartTime;
+ DWORD _testEndTime;
+};
+
+
+} // namespace CppUnit
+
+
+#endif // TestRunnerDlg_INCLUDED
+
diff --git a/CppUnit/WinTestRunner/src/WinTestRunner.cpp b/CppUnit/WinTestRunner/src/WinTestRunner.cpp
index 122b7d9c0..455e3da30 100644
--- a/CppUnit/WinTestRunner/src/WinTestRunner.cpp
+++ b/CppUnit/WinTestRunner/src/WinTestRunner.cpp
@@ -1,64 +1,64 @@
-//
-// WinTestRunner.cpp
-//
-// $Id: //poco/1.2/CppUnit/WinTestRunner/src/WinTestRunner.cpp#1 $
-//
-
-
-#include "WinTestRunner/WinTestRunner.h"
-#include "TestRunnerDlg.h"
-
-
-namespace CppUnit {
-
-
-WinTestRunner::WinTestRunner()
-{
-}
-
-
-WinTestRunner::~WinTestRunner()
-{
- for (std::vector::iterator it = _tests.begin(); it != _tests.end(); ++it)
- delete *it;
-}
-
-
-void WinTestRunner::run()
-{
- TestRunnerDlg dlg;
-
- dlg.setTests(_tests);
- dlg.DoModal();
-}
-
-
-void WinTestRunner::addTest(Test* pTest)
-{
- _tests.push_back(pTest);
-}
-
-
-BEGIN_MESSAGE_MAP(WinTestRunnerApp, CWinApp)
-END_MESSAGE_MAP()
-
-
-BOOL WinTestRunnerApp::InitInstance()
-{
- AllocConsole();
- SetConsoleTitle("CppUnit WinTestRunner Console");
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
- freopen("CONIN$", "r", stdin);
- TestMain();
- FreeConsole();
- return FALSE;
-}
-
-
-void WinTestRunnerApp::TestMain()
-{
-}
-
-
-} // namespace CppUnit
+//
+// WinTestRunner.cpp
+//
+// $Id: //poco/1.2/CppUnit/WinTestRunner/src/WinTestRunner.cpp#1 $
+//
+
+
+#include "WinTestRunner/WinTestRunner.h"
+#include "TestRunnerDlg.h"
+
+
+namespace CppUnit {
+
+
+WinTestRunner::WinTestRunner()
+{
+}
+
+
+WinTestRunner::~WinTestRunner()
+{
+ for (std::vector::iterator it = _tests.begin(); it != _tests.end(); ++it)
+ delete *it;
+}
+
+
+void WinTestRunner::run()
+{
+ TestRunnerDlg dlg;
+
+ dlg.setTests(_tests);
+ dlg.DoModal();
+}
+
+
+void WinTestRunner::addTest(Test* pTest)
+{
+ _tests.push_back(pTest);
+}
+
+
+BEGIN_MESSAGE_MAP(WinTestRunnerApp, CWinApp)
+END_MESSAGE_MAP()
+
+
+BOOL WinTestRunnerApp::InitInstance()
+{
+ AllocConsole();
+ SetConsoleTitle("CppUnit WinTestRunner Console");
+ freopen("CONOUT$", "w", stdout);
+ freopen("CONOUT$", "w", stderr);
+ freopen("CONIN$", "r", stdin);
+ TestMain();
+ FreeConsole();
+ return FALSE;
+}
+
+
+void WinTestRunnerApp::TestMain()
+{
+}
+
+
+} // namespace CppUnit
diff --git a/CppUnit/cppunit.vmsbuild b/CppUnit/cppunit.vmsbuild
index 3462685a6..789d2c8b9 100644
--- a/CppUnit/cppunit.vmsbuild
+++ b/CppUnit/cppunit.vmsbuild
@@ -1,14 +1,14 @@
-#
-# buildfiles.vms
-#
-# $Id: //poco/CppUnit/cppunit.vmsbuild#1 $
-#
-LIB=CppUnit
-CppUnitException
-TestCase
-TestDecorator
-TestFailure
-TestResult
-TestRunner
-TestSuite
-TextTestResult
+#
+# buildfiles.vms
+#
+# $Id: //poco/CppUnit/cppunit.vmsbuild#1 $
+#
+LIB=CppUnit
+CppUnitException
+TestCase
+TestDecorator
+TestFailure
+TestResult
+TestRunner
+TestSuite
+TextTestResult
diff --git a/CppUnit/doc/README.html b/CppUnit/doc/README.html
index 526e22f0b..5f8a1418a 100644
--- a/CppUnit/doc/README.html
+++ b/CppUnit/doc/README.html
@@ -1,75 +1,75 @@
-
-
-
-
-CppUnit 1.5
-
-
-
-
-
-CppUnit 1.5
-Last Revision: 12/15/99 - Michael Feathers (mfeathers@acm.org) - written in standard C++, tested under Microsoft Visual C++ 6.0
-
-Background
-CppUnit is a simple unit test framework for C++. It is a port from JUnit, a testing framework for Java, developed by Kent Beck and Erich Gamma.
-Contents
-README.html this file
-
- test the source code
- framework the testing framework
- extensions some framework extension classes
- textui a command line interface to run tests
- ms code for a Microsoft specific TestRunner
- samples some example test cases and extensions to the framework
- multicaster a sample illustrating a publish/subscribe
- multicaster under test
- doc documentation
-Installation
-To use the test framework, create a makefile or load all files in test\framework into your IDE. In this incarnation of CppUnit, all includes assume the current directory first. A makefile or project can be used to resolve the dependencies.
-The directory test\textui contains a simple command line example that uses the framework.
-Documentation
-CppUnit comes with the following documentation:
-
-
-- a cookbook: doc\cookbook.htm
-- this file
-
-Samples
-You can find several sample test cases in the samples directory:
-
-
-- ExampleTestCase - some simple tests
-- Multicaster - test cases for a sample publish/subscribe multicaster class
-
-Also, the wiki page http://c2.com/cgi/wiki?ClassHierarchyTestingInCppUnit shows how to automatically apply tests of classes to the classes' subclasses.
-
-Extensions
-You can find several classes that illustrate framework extensions in the extensions directory:
-
-
-- TestDecorator - A Decorator for Test. You can use it as the base class for decorators that extend test cases.
-- TestSetup - A Decorator that can be used to set up and tear down additional fixture state. Subclass TestSetup and insert it into your tests when you want to set up additional state once before the test is run.
-- Orthodox - a template class which can be used to verify operations on an arbitrary class.
-
-
-Notes
-Porting this framework has been fun. I've tried to maintain the spirit and utility of JUnit in a C++ environment. Naturally, the move from Java to standard C++ forces out several nice JUnit features:
-
-
-- Platform independent GUI.
-- Stack traces of test failures
-- Active (threaded) tests
-- Direct invocation of test cases via reflection
-- Run-time loading of new tests
-
-In addition, the lack of garbage collection in C++ requires some careful use of the framework classes. In particular, TestSuites are composites that manage the lifetime of any tests added to them. Holding onto a TestResult past the lifetime of the tests which filled it is a bad idea. This is because TestResults hold TestFailures and TestFailures hold pointers to the Tests that generated them.
-On the plus side, we can use the C++ macro preprocessor to get the exact line at which a failure occurs, along with the actual text inside the assert () call that detected the failure. The features of C++ that enable this are the __LINE__ and __FILE__ preprocessor definitions, along with the stringizing operator. If you find that generating this much literal text bulks up your test executables, you can use the CPP_UNIT_SOURCEANNOT define to disable that portion of the reporting.
-Note: If you use the C++ macro "assert ()" in your code, or include assert.h, you may have a name clash with CppUnit's assert macro. This can be remedied by changing the name of the macro to "cu_assert ()" in TestCase.h.
-I'd like to thank Kent Beck and Erich Gamma for the inspiration, design, and a wonderful cookbook that was easily/shamelessly mutated to describe CppUnit. Double thanks to Erich for thinking up a way to implement TestCaller. Additional thanks to Kent, Ward Cunningham, Ron Jeffries, Martin Fowler, and several other netizens of the WikiWikiWeb. I don't think any other bunch of people could have convinced me that rapid development with unit tests can be both effective and easy.
-Thanks also to Fred Huls for mentioning the idea of template-based testing. The orthodox template class demonstrates only a small part of what can be done with templated test cases.
-History Of Changes
-1.2 -- Added the TestCaller template class. There is now no need to use the CPP_UNIT_TESTCASEDISPATCH macro unless you are using a C++ compiler which does not support templates well. CPP_UNIT_TESTCASEDISPATCH remains in TestCase.h for backward compatibility. I've also kept the use of the macro in the Multicaster sample to leave in an example.
-1.3 -- Retired the CPP_UNIT_TESTCASEDISPATCH macro and cleaned up the include structure. Fixed bug in the textui version.
-1.4 -- Removed using directives for std in CppUnit headers. Merged the old AssertionFailedError into CppUnitException. Fixed a memory leak in the TestRunner class of the MS GUI TestRunner. Removed CppUnit.h file. Now headers for each class must be included directly.
-1.5 -- Upgraded projects from VC++ 5.0 to 6.0.