summaryrefslogtreecommitdiff
path: root/examples/msvc6/CppUnitTestApp
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2001-06-01 18:34:42 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2001-06-01 18:34:42 +0000
commit8c24e60a1c43fc24ee65618155795037770b5196 (patch)
tree753bbfb0a0ddf015a9694e6ae3890bc0ca84f5de /examples/msvc6/CppUnitTestApp
parentbc6338edfd9b10327c83142fef1e427c5cb3e80f (diff)
downloadcppunit-8c24e60a1c43fc24ee65618155795037770b5196.tar.gz
Added project cppunittest to examples/: unit tests to test cppunit.
added project cppunittest to examples/: unit tests to test cppunit. The main file is CppUnitTestMain.cpp. Unit tests have been implemented for TestCaller and TestListener. * added project CppUnitTestApp to examples/msvc6: graphical runner for cppunittest. * added TestListener to TestResult. It is a port of junit TestListener. * updated some .cvsignore to ignore files generated with VC++.
Diffstat (limited to 'examples/msvc6/CppUnitTestApp')
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw74
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp90
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsp190
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsw62
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.h52
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.rc219
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.cpp170
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.h49
-rw-r--r--examples/msvc6/CppUnitTestApp/ReadMe.txt88
-rw-r--r--examples/msvc6/CppUnitTestApp/Resource.h21
-rw-r--r--examples/msvc6/CppUnitTestApp/StdAfx.cpp8
-rw-r--r--examples/msvc6/CppUnitTestApp/StdAfx.h28
-rw-r--r--examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.icobin0 -> 1078 bytes
-rw-r--r--examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.rc213
14 files changed, 1064 insertions, 0 deletions
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw
new file mode 100644
index 0000000..c5e44f3
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw
@@ -0,0 +1,74 @@
+; CLW file contains information for the MFC ClassWizard
+
+[General Info]
+Version=1
+LastClass=CppUnitTestAppDlg
+LastTemplate=CDialog
+NewFileInclude1=#include "stdafx.h"
+NewFileInclude2=#include "CppUnitTestApp.h"
+
+ClassCount=4
+Class1=CppUnitTestApp
+Class2=CppUnitTestAppDlg
+Class3=CAboutDlg
+
+ResourceCount=5
+Resource1=IDD_ABOUTBOX
+Resource2=IDR_MAINFRAME
+Resource3=IDD_CPPUNITTESTAPP_DIALOG
+Resource4=IDD_ABOUTBOX (English (U.S.))
+Resource5=IDD_CPPUNITTESTAPP_DIALOG (English (U.S.))
+
+[CLS:CppUnitTestApp]
+Type=0
+HeaderFile=CppUnitTestApp.h
+ImplementationFile=CppUnitTestApp.cpp
+Filter=N
+
+[CLS:CppUnitTestAppDlg]
+Type=0
+HeaderFile=CppUnitTestAppDlg.h
+ImplementationFile=CppUnitTestAppDlg.cpp
+Filter=D
+
+[CLS:CAboutDlg]
+Type=0
+HeaderFile=CppUnitTestAppDlg.h
+ImplementationFile=CppUnitTestAppDlg.cpp
+Filter=D
+
+[DLG:IDD_ABOUTBOX]
+Type=1
+ControlCount=4
+Control1=IDC_STATIC,static,1342177283
+Control2=IDC_STATIC,static,1342308352
+Control3=IDC_STATIC,static,1342308352
+Control4=IDOK,button,1342373889
+Class=CAboutDlg
+
+
+[DLG:IDD_CPPUNITTESTAPP_DIALOG]
+Type=1
+ControlCount=3
+Control1=IDOK,button,1342242817
+Control2=IDCANCEL,button,1342242816
+Control3=IDC_STATIC,static,1342308352
+Class=CppUnitTestAppDlg
+
+[DLG:IDD_CPPUNITTESTAPP_DIALOG (English (U.S.))]
+Type=1
+Class=?
+ControlCount=3
+Control1=IDOK,button,1342242817
+Control2=IDCANCEL,button,1342242816
+Control3=IDC_STATIC,static,1342308352
+
+[DLG:IDD_ABOUTBOX (English (U.S.))]
+Type=1
+Class=?
+ControlCount=4
+Control1=IDC_STATIC,static,1342177283
+Control2=IDC_STATIC,static,1342308480
+Control3=IDC_STATIC,static,1342308352
+Control4=IDOK,button,1342373889
+
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp
new file mode 100644
index 0000000..5d6580b
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp
@@ -0,0 +1,90 @@
+// CppUnitTestApp.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "CppUnitTestApp.h"
+#include "CppUnitTestAppDlg.h"
+#include <msvc6/testrunner/TestRunner.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestApp
+
+BEGIN_MESSAGE_MAP(CppUnitTestApp, CWinApp)
+ //{{AFX_MSG_MAP(CppUnitTestApp)
+ // NOTE - the ClassWizard will add and remove mapping macros here.
+ // DO NOT EDIT what you see in these blocks of generated code!
+ //}}AFX_MSG
+ ON_COMMAND(ID_HELP, CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestApp construction
+
+CppUnitTestApp::CppUnitTestApp()
+{
+ // TODO: add construction code here,
+ // Place all significant initialization in InitInstance
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// The one and only CppUnitTestApp object
+
+CppUnitTestApp theApp;
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestApp initialization
+
+BOOL
+CppUnitTestApp::InitInstance()
+{
+ AfxEnableControlContainer();
+
+ // Standard initialization
+ // If you are not using these features and wish to reduce the size
+ // of your final executable, you should remove from the following
+ // the specific initialization routines you do not need.
+
+#ifdef _AFXDLL
+ Enable3dControls(); // Call this when using MFC in a shared DLL
+#else
+ Enable3dControlsStatic(); // Call this when linking to MFC statically
+#endif
+
+ RunTests();
+
+ CppUnitTestAppDlg dlg;
+ m_pMainWnd = &dlg;
+ int nResponse = dlg.DoModal();
+ if (nResponse == IDOK)
+ {
+ // TODO: Place code here to handle when the dialog is
+ // dismissed with OK
+ }
+ else if (nResponse == IDCANCEL)
+ {
+ // TODO: Place code here to handle when the dialog is
+ // dismissed with Cancel
+ }
+
+ // Since the dialog has been closed, return FALSE so that we exit the
+ // application, rather than start the application's message pump.
+ return FALSE;
+}
+
+
+void
+CppUnitTestApp::RunTests()
+{
+ TestRunner runner;
+
+ runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
+
+ runner.run();
+}
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsp b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsp
new file mode 100644
index 0000000..409cbd7
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsp
@@ -0,0 +1,190 @@
+# Microsoft Developer Studio Project File - Name="CppUnitTestApp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=CppUnitTestApp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "CppUnitTestApp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "CppUnitTestApp.mak" CFG="CppUnitTestApp - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CppUnitTestApp - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "CppUnitTestApp - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "CppUnitTestApp - Win32 Release"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "CU_USE_TYPEINFO" /Yu"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
+# ADD LINK32 ../../../Lib/cppunit.lib ../../../Lib/testrunner.lib /nologo /subsystem:windows /machine:I386
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=copy testrunner dll to Release
+PostBuild_Cmds=copy ..\..\..\Lib\testrunner.dll Release
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "CppUnitTestApp - Win32 Debug"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "CU_USE_TYPEINFO" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ../../../Lib/cppunitd.lib ../../../Lib/testrunnerd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=copy testrunner dll to debug
+PostBuild_Cmds=copy ..\..\..\Lib\testrunnerd.dll Debug
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "CppUnitTestApp - Win32 Release"
+# Name "CppUnitTestApp - Win32 Debug"
+# Begin Group "CppUnit Tests"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\cppunittest\MockTestListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\MockTestListener.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\TestCallerTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\TestCallerTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\TestResultTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\TestResultTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\TrackedTestCase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cppunittest\TrackedTestCase.h
+# End Source File
+# End Group
+# Begin Group "GUI"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\CppUnitTestApp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CppUnitTestApp.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CppUnitTestApp.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\CppUnitTestAppDlg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CppUnitTestAppDlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\res\CppUnitTestApp.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\CppUnitTestApp.rc2
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsw b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsw
new file mode 100644
index 0000000..78e0381
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsw
@@ -0,0 +1,62 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "CppUnitTestApp"=.\CppUnitTestApp.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cppunit
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name TestRunner
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "TestRunner"=..\..\..\src\msvc6\testrunner\TestRunner.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cppunit
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "cppunit"=..\..\..\src\cppunit\cppunit.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.h b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.h
new file mode 100644
index 0000000..542f3f9
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.h
@@ -0,0 +1,52 @@
+// CppUnitTestApp.h : main header file for the CPPUNITTESTAPP application
+//
+
+#if !defined(AFX_CPPUNITTESTAPP_H__6569C745_ED89_4902_9794_AD8422583BC1__INCLUDED_)
+#define AFX_CPPUNITTESTAPP_H__6569C745_ED89_4902_9794_AD8422583BC1__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#ifndef __AFXWIN_H__
+ #error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "resource.h" // main symbols
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestApp:
+// See CppUnitTestApp.cpp for the implementation of this class
+//
+
+class CppUnitTestApp : public CWinApp
+{
+public:
+ CppUnitTestApp();
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CppUnitTestApp)
+ public:
+ virtual BOOL InitInstance();
+ //}}AFX_VIRTUAL
+
+// Implementation
+
+ //{{AFX_MSG(CppUnitTestApp)
+ // NOTE - the ClassWizard will add and remove member functions here.
+ // DO NOT EDIT what you see in these blocks of generated code !
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+private:
+ void RunTests();
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_CPPUNITTESTAPP_H__6569C745_ED89_4902_9794_AD8422583BC1__INCLUDED_)
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.rc b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.rc
new file mode 100644
index 0000000..04d775a
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.rc
@@ -0,0 +1,219 @@
+//Microsoft Developer Studio 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
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About CppUnitTestApp"
+FONT 8, "MS Sans Serif"
+BEGIN
+ ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
+ LTEXT "CppUnitTestApp Version 1.0",IDC_STATIC,40,10,119,8,
+ SS_NOPREFIX
+ LTEXT "Copyright (C) 2001",IDC_STATIC,40,25,119,8
+ DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
+END
+
+IDD_CPPUNITTESTAPP_DIALOG DIALOGEX 0, 0, 320, 200
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "CppUnitTestApp"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,260,7,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,260,23,50,14
+ LTEXT "TODO: Place dialog controls here.",IDC_STATIC,50,90,200,
+ 8
+END
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// 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 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "CppUnitTestApp MFC Application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "CppUnitTestApp\0"
+ VALUE "LegalCopyright", "Copyright (C) 2001\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "CppUnitTestApp.EXE\0"
+ VALUE "ProductName", "CppUnitTestApp Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_ABOUTBOX, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 228
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 48
+ END
+
+ IDD_CPPUNITTESTAPP_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 313
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 193
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ABOUTBOX "&About CppUnitTestApp..."
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+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 //_WIN32\r\n"
+ "#include ""res\\CppUnitTestApp.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME ICON DISCARDABLE "res\\CppUnitTestApp.ico"
+#endif // French (France) 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 //_WIN32
+#include "res\CppUnitTestApp.rc2" // non-Microsoft Visual C++ edited resources
+#include "afxres.rc" // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.cpp b/examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.cpp
new file mode 100644
index 0000000..882e6f9
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.cpp
@@ -0,0 +1,170 @@
+// CppUnitTestAppDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "CppUnitTestApp.h"
+#include "CppUnitTestAppDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CAboutDlg dialog used for App About
+
+class CAboutDlg : public CDialog
+{
+public:
+ CAboutDlg();
+
+// Dialog Data
+ //{{AFX_DATA(CAboutDlg)
+ enum { IDD = IDD_ABOUTBOX };
+ //}}AFX_DATA
+
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CAboutDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+ //{{AFX_MSG(CAboutDlg)
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
+{
+ //{{AFX_DATA_INIT(CAboutDlg)
+ //}}AFX_DATA_INIT
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CAboutDlg)
+ //}}AFX_DATA_MAP
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
+ //{{AFX_MSG_MAP(CAboutDlg)
+ // No message handlers
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestAppDlg dialog
+
+CppUnitTestAppDlg::CppUnitTestAppDlg(CWnd* pParent /*=NULL*/)
+ : CDialog(CppUnitTestAppDlg::IDD, pParent)
+{
+ //{{AFX_DATA_INIT(CppUnitTestAppDlg)
+ // NOTE: the ClassWizard will add member initialization here
+ //}}AFX_DATA_INIT
+ // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
+ m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+}
+
+void CppUnitTestAppDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CppUnitTestAppDlg)
+ // NOTE: the ClassWizard will add DDX and DDV calls here
+ //}}AFX_DATA_MAP
+}
+
+BEGIN_MESSAGE_MAP(CppUnitTestAppDlg, CDialog)
+ //{{AFX_MSG_MAP(CppUnitTestAppDlg)
+ ON_WM_SYSCOMMAND()
+ ON_WM_PAINT()
+ ON_WM_QUERYDRAGICON()
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestAppDlg message handlers
+
+BOOL CppUnitTestAppDlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // Add "About..." menu item to system menu.
+
+ // IDM_ABOUTBOX must be in the system command range.
+ ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
+ ASSERT(IDM_ABOUTBOX < 0xF000);
+
+ CMenu* pSysMenu = GetSystemMenu(FALSE);
+ if (pSysMenu != NULL)
+ {
+ CString strAboutMenu;
+ strAboutMenu.LoadString(IDS_ABOUTBOX);
+ if (!strAboutMenu.IsEmpty())
+ {
+ pSysMenu->AppendMenu(MF_SEPARATOR);
+ pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
+ }
+ }
+
+ // Set the icon for this dialog. The framework does this automatically
+ // when the application's main window is not a dialog
+ SetIcon(m_hIcon, TRUE); // Set big icon
+ SetIcon(m_hIcon, FALSE); // Set small icon
+
+ // TODO: Add extra initialization here
+
+ return TRUE; // return TRUE unless you set the focus to a control
+}
+
+void CppUnitTestAppDlg::OnSysCommand(UINT nID, LPARAM lParam)
+{
+ if ((nID & 0xFFF0) == IDM_ABOUTBOX)
+ {
+ CAboutDlg dlgAbout;
+ dlgAbout.DoModal();
+ }
+ else
+ {
+ CDialog::OnSysCommand(nID, lParam);
+ }
+}
+
+// If you add a minimize button to your dialog, you will need the code below
+// to draw the icon. For MFC applications using the document/view model,
+// this is automatically done for you by the framework.
+
+void CppUnitTestAppDlg::OnPaint()
+{
+ if (IsIconic())
+ {
+ CPaintDC dc(this); // device context for painting
+
+ SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
+
+ // Center icon in client rectangle
+ int cxIcon = GetSystemMetrics(SM_CXICON);
+ int cyIcon = GetSystemMetrics(SM_CYICON);
+ CRect rect;
+ GetClientRect(&rect);
+ int x = (rect.Width() - cxIcon + 1) / 2;
+ int y = (rect.Height() - cyIcon + 1) / 2;
+
+ // Draw the icon
+ dc.DrawIcon(x, y, m_hIcon);
+ }
+ else
+ {
+ CDialog::OnPaint();
+ }
+}
+
+// The system calls this to obtain the cursor to display while the user drags
+// the minimized window.
+HCURSOR CppUnitTestAppDlg::OnQueryDragIcon()
+{
+ return (HCURSOR) m_hIcon;
+}
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.h b/examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.h
new file mode 100644
index 0000000..cc11da8
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestAppDlg.h
@@ -0,0 +1,49 @@
+// CppUnitTestAppDlg.h : header file
+//
+
+#if !defined(AFX_CPPUNITTESTAPPDLG_H__25E1CF20_72A4_4E25_B930_626DF60AD4C7__INCLUDED_)
+#define AFX_CPPUNITTESTAPPDLG_H__25E1CF20_72A4_4E25_B930_626DF60AD4C7__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+/////////////////////////////////////////////////////////////////////////////
+// CppUnitTestAppDlg dialog
+
+class CppUnitTestAppDlg : public CDialog
+{
+// Construction
+public:
+ CppUnitTestAppDlg(CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ //{{AFX_DATA(CppUnitTestAppDlg)
+ enum { IDD = IDD_CPPUNITTESTAPP_DIALOG };
+ // NOTE: the ClassWizard will add data members here
+ //}}AFX_DATA
+
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CppUnitTestAppDlg)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+ HICON m_hIcon;
+
+ // Generated message map functions
+ //{{AFX_MSG(CppUnitTestAppDlg)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
+ afx_msg void OnPaint();
+ afx_msg HCURSOR OnQueryDragIcon();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_CPPUNITTESTAPPDLG_H__25E1CF20_72A4_4E25_B930_626DF60AD4C7__INCLUDED_)
diff --git a/examples/msvc6/CppUnitTestApp/ReadMe.txt b/examples/msvc6/CppUnitTestApp/ReadMe.txt
new file mode 100644
index 0000000..8dcfccb
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/ReadMe.txt
@@ -0,0 +1,88 @@
+========================================================================
+ MICROSOFT FOUNDATION CLASS LIBRARY : CppUnitTestApp
+========================================================================
+
+
+AppWizard has created this CppUnitTestApp application for you. This application
+not only demonstrates the basics of using the Microsoft Foundation classes
+but is also a starting point for writing your application.
+
+This file contains a summary of what you will find in each of the files that
+make up your CppUnitTestApp application.
+
+CppUnitTestApp.dsp
+ This file (the project file) contains information at the project level and
+ is used to build a single project or subproject. Other users can share the
+ project (.dsp) file, but they should export the makefiles locally.
+
+CppUnitTestApp.h
+ This is the main header file for the application. It includes other
+ project specific headers (including Resource.h) and declares the
+ CppUnitTestApp application class.
+
+CppUnitTestApp.cpp
+ This is the main application source file that contains the application
+ class CppUnitTestApp.
+
+CppUnitTestApp.rc
+ This is a listing of all of the Microsoft Windows resources that the
+ program uses. It includes the icons, bitmaps, and cursors that are stored
+ in the RES subdirectory. This file can be directly edited in Microsoft
+ Visual C++.
+
+CppUnitTestApp.clw
+ This file contains information used by ClassWizard to edit existing
+ classes or add new classes. ClassWizard also uses this file to store
+ information needed to create and edit message maps and dialog data
+ maps and to create prototype member functions.
+
+res\CppUnitTestApp.ico
+ This is an icon file, which is used as the application's icon. This
+ icon is included by the main resource file CppUnitTestApp.rc.
+
+res\CppUnitTestApp.rc2
+ This file contains resources that are not edited by Microsoft
+ Visual C++. You should place all resources not editable by
+ the resource editor in this file.
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+AppWizard creates one dialog class:
+
+CppUnitTestAppDlg.h, CppUnitTestAppDlg.cpp - the dialog
+ These files contain your CppUnitTestAppDlg class. This class defines
+ the behavior of your application's main dialog. The dialog's
+ template is in CppUnitTestApp.rc, which can be edited in Microsoft
+ Visual C++.
+
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named CppUnitTestApp.pch and a precompiled types file named StdAfx.obj.
+
+Resource.h
+ This is the standard header file, which defines new resource IDs.
+ Microsoft Visual C++ reads and updates this file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+If your application uses MFC in a shared DLL, and your application is
+in a language other than the operating system's current language, you
+will need to copy the corresponding localized resources MFC42XXX.DLL
+from the Microsoft Visual C++ CD-ROM onto the system or system32 directory,
+and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation.
+For example, MFC42DEU.DLL contains resources translated to German.) If you
+don't do this, some of the UI elements of your application will remain in the
+language of the operating system.
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/examples/msvc6/CppUnitTestApp/Resource.h b/examples/msvc6/CppUnitTestApp/Resource.h
new file mode 100644
index 0000000..2a20997
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/Resource.h
@@ -0,0 +1,21 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by CPPUNITTESTAPP.RC
+//
+#define IDR_MAINFRAME 128
+#define IDM_ABOUTBOX 0x0010
+#define IDD_ABOUTBOX 100
+#define IDS_ABOUTBOX 101
+#define IDD_CPPUNITTESTAPP_DIALOG 102
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+
+#define _APS_NEXT_RESOURCE_VALUE 129
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 32771
+#endif
+#endif
diff --git a/examples/msvc6/CppUnitTestApp/StdAfx.cpp b/examples/msvc6/CppUnitTestApp/StdAfx.cpp
new file mode 100644
index 0000000..e832939
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/StdAfx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// CppUnitTestApp.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
+
diff --git a/examples/msvc6/CppUnitTestApp/StdAfx.h b/examples/msvc6/CppUnitTestApp/StdAfx.h
new file mode 100644
index 0000000..81f2a0c
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/StdAfx.h
@@ -0,0 +1,28 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__EB0CB528_6505_4130_843B_9CA567127807__INCLUDED_)
+#define AFX_STDAFX_H__EB0CB528_6505_4130_843B_9CA567127807__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+#include <afxdisp.h> // MFC Automation classes
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#pragma warning( disable : 4786 ) // remove warning "debug symbol length > 255..."
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__EB0CB528_6505_4130_843B_9CA567127807__INCLUDED_)
diff --git a/examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.ico b/examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.ico
new file mode 100644
index 0000000..7eef0bc
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.ico
Binary files differ
diff --git a/examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.rc2 b/examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.rc2
new file mode 100644
index 0000000..b8d1fca
--- /dev/null
+++ b/examples/msvc6/CppUnitTestApp/res/CppUnitTestApp.rc2
@@ -0,0 +1,13 @@
+//
+// CPPUNITTESTAPP.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+ #error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////