CppUnit project page | FAQ

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

MfcTestRunner.h
Go to the documentation of this file.
1 #ifndef CPPUNITUI_MFC_MFCTESTRUNNER_H
2 #define CPPUNITUI_MFC_MFCTESTRUNNER_H
3
4 #if _MSC_VER >= 1000
5 #pragma once
6 #endif // _MSC_VER >= 1000
7
8 #include <cppunit/Portability.h>
9 #include <cppunit/portability/CppUnitVector.h>
10
11 /* Refer to MSDN documentation to know how to write and use MFC extension DLL:
12 mk:@MSITStore:h:\DevStudio\MSDN\98VSa\1036\vcmfc.chm::/html/_mfcnotes_tn033.htm#_mfcnotes_how_to_write_an_mfc_extension_dll
13
14 This can be found in the index with "mfc extension"
15 The basic:
16 Using:
17 - your application must use MFC DLL
18 - memory allocation is done using the same heap
19 - you must define the symbol _AFX_DLL
20
21 Building:
22 - you must define the symbol _AFX_DLL and _AFX_EXT
23 - export class using AFX_EXT_CLASS
24 */
25
26 CPPUNIT_NS_BEGIN
27
28 class Test;
29 class TestSuite;
30
31
52 class AFX_EXT_CLASS MfcTestRunner
53 {
54 public:
55 MfcTestRunner();
56 virtual ~MfcTestRunner();
57
58 void run();
59
60 void addTest( Test *test );
61
62 void addTests( const CppUnitVector<Test *> &tests );
63
64 protected:
65 Test *getRootTest();
66
67 TestSuite *m_suite;
68
69 typedef CppUnitVector<Test *> Tests;
70 Tests m_tests;
71 };
72
73
74 CPPUNIT_NS_END
75
76 #endif // CPPUNITUI_MFC_MFCTESTRUNNER_H
Portability.h
MfcTestRunner::Tests
CppUnitVector< Test * > Tests
Definition: MfcTestRunner.h:69
MfcTestRunner::m_suite
TestSuite * m_suite
Definition: MfcTestRunner.h:67
Test
Base class for all test objects.All test objects should be a subclass of Test. Some test objects...
Definition: Test.h:25
CppUnitVector.h
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
MfcTestRunner
MFC test runner.Use this to launch the MFC TestRunner. Usually called from you CWinApp subclass: ...
Definition: MfcTestRunner.h:52
MfcTestRunner::m_tests
Tests m_tests
Definition: MfcTestRunner.h:70
TestSuite
A Composite of Tests.It runs a collection of test cases. Here is an example.
Definition: TestSuite.h:40

| Send comments to: CppUnit Developers