00001 00002 // Name: TestCase.h 00003 // Purpose: 00004 // Author: Marty Saxton 00005 // Modified by: 00006 // Created: 10/27/2001 00007 // RCS-ID: $Id: TestCase.h,v 1.3 2001/11/09 02:18:32 marty Exp $ 00008 // Copyright: (c) Marty Saxton, Thundercow Software 00009 // Licence: wxWindows license 00011 00012 #ifndef __WXTESTBASE_H__ 00013 #define __WXTESTBASE_H__ 00014 00015 #include <wxTest/ITest.h> 00016 00017 WXTEST_BEGIN_NAMESPACE 00018 00027 class wxTestCase : public wxITest 00028 { 00029 public: 00030 wxTestCase( const char* pszDescription, wxITest* pParent = 0 ); 00031 virtual ~wxTestCase(); 00032 00036 virtual void Delete(); 00037 00043 virtual const char* GetDescription(); 00044 00050 virtual TestState GetState(); 00051 00052 virtual void SetState( TestState newState ); 00053 00059 virtual void Run( wxITestRunner* pResult ) {} 00060 00067 virtual void Run( wxITestRunner* pResult, long unsigned nThreadId ) {} 00068 00074 virtual bool IsThreadSafe(); 00075 00080 virtual int GetNumSubTests() { return 0; } 00081 00087 virtual void GetSubTests( wxITest ** pOutTests ) {} 00088 00089 00095 virtual const wxITest* GetParent() const; 00096 00102 virtual wxITest* GetParent() ; 00103 00109 virtual void SetParent( wxITest* pParent ) ; 00110 00114 virtual void Setup(); 00115 00119 virtual void TearDown(); 00120 00121 00122 protected: 00123 typedef long unsigned ThreadId; 00124 00125 char* m_pszDescription; 00126 TestState m_state; 00127 wxITest* m_pParent; 00128 00129 }; 00130 00131 WXTEST_END_NAMESPACE 00132 00133 #endif //__WXTESTBASE_H__ 00134