CppUnit project page FAQ CppUnit home page

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TestRunner.h

Go to the documentation of this file.
00001 // //////////////////////////////////////////////////////////////////////////
00002 // Header file TestRunner.h for class TestRunner
00003 // (c)Copyright 2000, Baptiste Lepilleur.
00004 // Created: 2001/04/26
00005 // //////////////////////////////////////////////////////////////////////////
00006 #ifndef TESTRUNNER_TESTRUNNER_H
00007 #define TESTRUNNER_TESTRUNNER_H
00008 
00009 
00010 #if _MSC_VER >= 1000
00011 #pragma once
00012 #endif // _MSC_VER >= 1000
00013 
00014 #include <vector>
00015 #include <cppunit/TestSuite.h>
00016 
00017 /* Refer to MSDN documentation to know how to write and use MFC extension DLL:
00018    mk:@MSITStore:h:\DevStudio\MSDN\98VSa\1036\vcmfc.chm::/html/_mfcnotes_tn033.htm#_mfcnotes_how_to_write_an_mfc_extension_dll
00019    
00020    This can be found in the index with "mfc extension"
00021    The basic:
00022    Using:
00023    - your application must use MFC DLL
00024    - memory allocation is done using the same heap
00025    - you must define the symbol _AFX_DLL
00026 
00027    Building:
00028    - you must define the symbol _AFX_DLL and _AFX_EXT
00029    - export class using AFX_EXT_CLASS
00030  */
00031 
00032 
00033 
00034 // A Wrapper
00035 class AFX_EXT_CLASS TestRunner 
00036 {
00037 public:
00038          TestRunner ();
00039          ~TestRunner ();
00040 
00041     void run ();
00042 
00043     void addTest (CppUnit::Test *test);
00044 
00045     void addTests (const std::vector<CppUnit::Test *> &tests); 
00046 
00047 protected:
00048   CppUnit::Test *   getRootTest();
00049 
00050   CppUnit::TestSuite *m_suite;
00051 
00052   typedef std::vector<CppUnit::Test *> Tests;
00053   Tests m_tests;
00054 };
00055 
00056 #endif  // TESTRUNNER_TESTRUNNER_H

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