CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

TestRunner.h

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

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers