1
// CppUnitTestApp.cpp : Defines the class behaviors for the application.
5
#include "CppUnitTestApp.h"
6
#include "CppUnitTestAppDlg.h"
7
#include <cppunit/ui/mfc/TestRunner.h>
8
#include <cppunit/extensions/TestFactoryRegistry.h>
13
static char THIS_FILE[] = __FILE__;
16
/////////////////////////////////////////////////////////////////////////////
19
BEGIN_MESSAGE_MAP(CppUnitTestApp, CWinApp)
20
//{{AFX_MSG_MAP(CppUnitTestApp)
21
// NOTE - the ClassWizard will add and remove mapping macros here.
22
// DO NOT EDIT what you see in these blocks of generated code!
24
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
27
/////////////////////////////////////////////////////////////////////////////
28
// CppUnitTestApp construction
30
CppUnitTestApp::CppUnitTestApp()
32
// TODO: add construction code here,
33
// Place all significant initialization in InitInstance
36
/////////////////////////////////////////////////////////////////////////////
37
// The one and only CppUnitTestApp object
39
CppUnitTestApp theApp;
41
/////////////////////////////////////////////////////////////////////////////
42
// CppUnitTestApp initialization
45
CppUnitTestApp::InitInstance()
47
AfxEnableControlContainer();
49
// Standard initialization
50
// If you are not using these features and wish to reduce the size
51
// of your final executable, you should remove from the following
52
// the specific initialization routines you do not need.
55
# if _MSC_VER < 1300 // vc6
56
Enable3dControls(); // Call this when using MFC in a shared DLL
59
Enable3dControlsStatic(); // Call this when linking to MFC statically
62
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
67
// Since the dialog has been closed, return FALSE so that we exit the
68
// application, rather than start the application's message pump.
74
CppUnitTestApp::RunTests()
76
CPPUNIT_NS::MfcUi::TestRunner runner;
78
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );