Develop and Download Open Source Software

Browse CVS Repository

Contents of /tombo/Tombo/CppUnitTestApp/CppUnitTestApp.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Sat Sep 17 15:44:32 2005 UTC (18 years, 6 months ago) by hirami
Branch: MAIN
CVS Tags: Tombo_1_15, Tombo_1_17, Tombo_1_16, Tombo_2_0a3, B187, B186, Tombo_1_17_1, B189, B208, B213, B212, B211, B217, B216, B215, B214, B231, B230, B219, B218, SNAPSHOT20051220, B206, B207, B188, Tombo_2_0b2, Tombo_2_0b3, Tombo_2_0b1, Tombo_2_0b4, B191, B192, B193, B194, B196, B197, B198, B199, B200, B201, B202, B203, B205, B228, B229, B226, B227, B224, B225, B222, B223, B220, B221, HEAD
Branch point for: Tombo_1_17_1_branch
Changes since 1.1: +84 -0 lines
File MIME type: text/x-c++src
- removing g_Property.TopDir() dependency still.
- add unittest proj
- implement URIScanner class but not integrated yet.

1 // CppUnitTestApp.cpp : Defines the class behaviors for the application.
2 //
3
4 #include "stdafx.h"
5 #include "CppUnitTestApp.h"
6 #include "CppUnitTestAppDlg.h"
7 #include <cppunit/ui/mfc/TestRunner.h>
8 #include <cppunit/extensions/TestFactoryRegistry.h>
9
10 #ifdef _DEBUG
11 #define new DEBUG_NEW
12 #undef THIS_FILE
13 static char THIS_FILE[] = __FILE__;
14 #endif
15
16 /////////////////////////////////////////////////////////////////////////////
17 // CppUnitTestApp
18
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!
23 //}}AFX_MSG
24 ON_COMMAND(ID_HELP, CWinApp::OnHelp)
25 END_MESSAGE_MAP()
26
27 /////////////////////////////////////////////////////////////////////////////
28 // CppUnitTestApp construction
29
30 CppUnitTestApp::CppUnitTestApp()
31 {
32 // TODO: add construction code here,
33 // Place all significant initialization in InitInstance
34 }
35
36 /////////////////////////////////////////////////////////////////////////////
37 // The one and only CppUnitTestApp object
38
39 CppUnitTestApp theApp;
40
41 HINSTANCE g_hInstance;
42
43 /////////////////////////////////////////////////////////////////////////////
44 // CppUnitTestApp initialization
45
46 BOOL
47 CppUnitTestApp::InitInstance()
48 {
49 AfxEnableControlContainer();
50 g_hInstance = m_hInstance;
51
52 // Standard initialization
53 // If you are not using these features and wish to reduce the size
54 // of your final executable, you should remove from the following
55 // the specific initialization routines you do not need.
56
57 #ifdef _AFXDLL
58 # if _MSC_VER < 1300 // vc6
59 Enable3dControls(); // Call this when using MFC in a shared DLL
60 # endif
61 #else
62 Enable3dControlsStatic(); // Call this when linking to MFC statically
63 #endif
64
65 SetRegistryKey(_T("Local AppWizard-Generated Applications"));
66
67 RunTests();
68
69
70 // Since the dialog has been closed, return FALSE so that we exit the
71 // application, rather than start the application's message pump.
72 return FALSE;
73 }
74
75
76 void
77 CppUnitTestApp::RunTests()
78 {
79 CPPUNIT_NS::MfcUi::TestRunner runner;
80
81 runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
82
83 runner.run();
84 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26