Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

wxTestBase Class Reference

A base implementation of the wxITest interface. More...

#include <TestBase.h>

Inheritance diagram for wxTestBase::

wxITest List of all members.

Public Methods

 wxTestBase (const char *pszDescription, wxITest *pParent=0)
virtual ~wxTestBase ()
virtual void Delete ()
 Destroys and deallocates the test. More...

virtual const char * GetDescription ()
 Retreive a human readable description of this test. More...

virtual TestState GetState ()
 Retreive the current TestState of this test. More...

virtual void SetState (TestState newState)
 Assign a new state to this test. More...

virtual void Run (wxITestRunner *pResult)
 Begin executing this test. More...

virtual void Run (wxITestRunner *pResult, long unsigned nThreadId)
 Begin executing this test in a multi-threaded enviroment. More...

virtual bool IsThreadSafe ()
 Determine if this test is intended to be thread-safe. More...

virtual int GetNumSubTests ()
 Retreive the number of sub-tests for this test. More...

virtual void GetSubTests (wxITest **pOutTests)
 Retreive the child-tests of this test. More...

virtual const wxITestGetParent () const
 Retreive the parent of this test. More...

virtual wxITestGetParent ()
 Retreive the parent of this test. More...

virtual void SetParent (wxITest *pParent)
 Assign a new parent to this test. More...

virtual void Setup ()
 Set up this object's state before actually executing any tests. More...

virtual void TearDown ()
 Clean up anything that was allocated in Setup. More...


Protected Types

typedef long unsigned ThreadId

Protected Attributes

char * m_pszDescription
TestState m_state
wxITestm_pParent

Detailed Description

A base implementation of the wxITest interface.

Definition at line 16 of file TestBase.h.


Member Typedef Documentation

typedef long unsigned wxTestBase::ThreadId [protected]
 

Definition at line 112 of file TestBase.h.


Constructor & Destructor Documentation

wxTestBase::wxTestBase const char *    pszDescription,
wxITest   pParent = 0
 

virtual wxTestBase::~wxTestBase   [virtual]
 


Member Function Documentation

virtual void wxTestBase::Delete   [virtual]
 

Destroys and deallocates the test.

Reimplemented from wxITest.

virtual const char* wxTestBase::GetDescription   [virtual]
 

Retreive a human readable description of this test.

Returns:
A null terminated string that is the description of this test.

Reimplemented from wxITest.

virtual TestState wxTestBase::GetState   [virtual]
 

Retreive the current TestState of this test.

Returns:
The current TestState of this test.

Reimplemented from wxITest.

virtual void wxTestBase::SetState TestState    newState [virtual]
 

Assign a new state to this test.

This method is usually called by the test-runner after the test has completed.

Returns:
The current TestState of this test.

Reimplemented from wxITest.

virtual void wxTestBase::Run wxITestRunner   pResult [inline, virtual]
 

Begin executing this test.

Parameters:
pResult  The result object that will recieve the results of this test.

Reimplemented from wxITest.

Definition at line 48 of file TestBase.h.

virtual void wxTestBase::Run wxITestRunner   pResult,
long unsigned    nThreadId
[inline, virtual]
 

Begin executing this test in a multi-threaded enviroment.

Parameters:
pResult  The result object that will recieve the results of this test.
nThreadId  The thread identifer of the thread in which this test is running.

Reimplemented from wxITest.

Definition at line 56 of file TestBase.h.

virtual bool wxTestBase::IsThreadSafe   [virtual]
 

Determine if this test is intended to be thread-safe.

This useful for test runners that may want to run the test in multiple threads simultaneously to test for resource conflicts and deadlocks.

Reimplemented from wxITest.

virtual int wxTestBase::GetNumSubTests   [inline, virtual]
 

Retreive the number of sub-tests for this test.

Reimplemented from wxITest.

Definition at line 69 of file TestBase.h.

virtual void wxTestBase::GetSubTests wxITest **    pOutTests [inline, virtual]
 

Retreive the child-tests of this test.

Parameters:
pOutTests  A pointer to a buffer that will recieve pointers to the sub-tests.

Reimplemented from wxITest.

Definition at line 76 of file TestBase.h.

virtual const wxITest* wxTestBase::GetParent   const [virtual]
 

Retreive the parent of this test.

Returns:
A pointer to the parent test of this test, or NULL if this test has no parent.

Reimplemented from wxITest.

virtual wxITest* wxTestBase::GetParent   [virtual]
 

Retreive the parent of this test.

Returns:
A pointer to the parent test of this test, or NULL if this test has no parent.

Reimplemented from wxITest.

virtual void wxTestBase::SetParent wxITest   pParent [virtual]
 

Assign a new parent to this test.

Parameters:
pParent  The test that is to be the parent of this test.

Reimplemented from wxITest.

virtual void wxTestBase::Setup   [virtual]
 

Set up this object's state before actually executing any tests.

virtual void wxTestBase::TearDown   [virtual]
 

Clean up anything that was allocated in Setup.


Member Data Documentation

char* wxTestBase::m_pszDescription [protected]
 

Definition at line 114 of file TestBase.h.

TestState wxTestBase::m_state [protected]
 

Definition at line 115 of file TestBase.h.

wxITest* wxTestBase::m_pParent [protected]
 

Definition at line 116 of file TestBase.h.


The documentation for this class was generated from the following file:
ThunderCow Software (c) 2001 Marty Saxton, ThunderCow Software. Generated on Sat Nov 17 14:08:32 2001 for wxTest by Doxygen 1.2.11