From 5813e2e80e995893a0a2d2fe4a6f6a8c2155d82c Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Wed, 27 Jun 2001 20:23:22 +0000 Subject: Examples/msvc6/CppUnitTestApp/CppUnitTestApp. examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsp: moved dll copy from post-build to custom build setting, so that the dll is copied even if the CppUnitTestApp was not modified. * examples/msvc6/TestPlugIn/: a new example of test plug in. * src/msvc6/TestRunner/ListCtrlFormatter.* * src/msvc6/TestRunner/ListCtrlSetter.*: added, helper to manipulate list control. * src/msvc6/TestRunner/TestRunnerDlg.*: change to make the error list more compact. text moved to string resources. icons added for typ test tfailure type. * src/msvc6/TestRunner/MostRecentTests.*: added, classes that will replace the current implementation of MRU test which make it hard to subclass the dialog. * src/msvc6/TestRunner/res/errortype.bmp: added, bitmap with error types (failure and error). * src/msvc6/TestPlugInRunner/: A test runner to run test plug in. Test plug in are DLL that publish a specified plug in interface. Those DLL are loaded and reloaded by the TestPlugInRunner to run tests. This remove the need to wrap DLL with a executable to test them. * src/cppunit/cppunit.dsp: removed config.h from project added Portability.h and config-msvc6.h * include/cppunit/config-msvc6.h: undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST --- src/msvc6/testpluginrunner/TestPlugInRunnerApp.cpp | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/msvc6/testpluginrunner/TestPlugInRunnerApp.cpp (limited to 'src/msvc6/testpluginrunner/TestPlugInRunnerApp.cpp') diff --git a/src/msvc6/testpluginrunner/TestPlugInRunnerApp.cpp b/src/msvc6/testpluginrunner/TestPlugInRunnerApp.cpp new file mode 100644 index 0000000..e81fa49 --- /dev/null +++ b/src/msvc6/testpluginrunner/TestPlugInRunnerApp.cpp @@ -0,0 +1,76 @@ +// TestPlugInRunner.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "TestPlugInRunnerApp.h" +#include "TestPlugInRunnerDlg.h" +#include "TestPlugInRunnerModel.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// TestPlugInRunnerApp + +BEGIN_MESSAGE_MAP(TestPlugInRunnerApp, CWinApp) + //{{AFX_MSG_MAP(TestPlugInRunnerApp) + // 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() + +///////////////////////////////////////////////////////////////////////////// +// TestPlugInRunnerApp construction + +TestPlugInRunnerApp::TestPlugInRunnerApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only TestPlugInRunnerApp object + +TestPlugInRunnerApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// TestPlugInRunnerApp initialization + +BOOL TestPlugInRunnerApp::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 + + TestPlugInRunnerModel model; + TestPlugInRunnerDlg dlg( &model ); + 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; +} -- cgit v1.2.1