CppUnit project page | FAQ | CppUnit home page

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

- File List
- File Members

# MfcTestRunner.h

Go to the documentation of this file.

    00001 #ifndef CPPUNITUI_MFC_MFCTESTRUNNER_H
    00002 #define CPPUNITUI_MFC_MFCTESTRUNNER_H
    00003
    00004 #if _MSC_VER >= 1000
    00005 #pragma once
    00006 #endif // _MSC_VER >= 1000
    00007
    00008 #include <cppunit/Portability.h>
    00009 #include <cppunit/portability/CppUnitVector.h>
    00010
    00011 /* Refer to MSDN documentation to know how to write and use MFC extension DLL:
    00012    mk:@MSITStore:h:\DevStudio\MSDN\98VSa\1036\vcmfc.chm::/html/_mfcnotes_tn033.htm#_mfcnotes_how_to_write_an_mfc_extension_dll
    00013
    00014    This can be found in the index with "mfc extension"
    00015    The basic:
    00016    Using:
    00017    - your application must use MFC DLL
    00018    - memory allocation is done using the same heap
    00019    - you must define the symbol _AFX_DLL
    00020
    00021    Building:
    00022    - you must define the symbol _AFX_DLL and _AFX_EXT
    00023    - export class using AFX_EXT_CLASS
    00024  */
    00025
    00026 CPPUNIT_NS_BEGIN
    00027
    00028   class Test;
    00029   class TestSuite;
    00030
    00031
    00052 class AFX_EXT_CLASS MfcTestRunner
    00053 {
    00054 public:
    00055   MfcTestRunner();
    00056   virtual ~MfcTestRunner();
    00057
    00058   void run();
    00059
    00060   void addTest( Test *test );
    00061
    00062   void addTests( const CppUnitVector<Test *> &tests );
    00063
    00064 protected:
    00065   Test *getRootTest();
    00066
    00067   TestSuite *m_suite;
    00068
    00069   typedef CppUnitVector<Test *> Tests;
    00070   Tests m_tests;
    00071 };
    00072
    00073
    00074 CPPUNIT_NS_END
    00075
    00076 #endif // CPPUNITUI_MFC_MFCTESTRUNNER_H

| hosts this site. |  | Send comments to: CppUnit Developers