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

wxTestCase Class Reference

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

#include <TestCase.h>

Inheritance diagram for wxTestCase::

wxITest wxTestCaseMultiThreaded wxTestCaller List of all members.

Public Methods

 wxTestCase (const char *pszDescription, wxITest *pParent=0)
virtual ~wxTestCase ()
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 27 of file TestCase.h.


Member Typedef Documentation

typedef long unsigned wxTestCase::ThreadId [protected]
 

Definition at line 123 of file TestCase.h.


Constructor & Destructor Documentation

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

virtual wxTestCase::~wxTestCase   [virtual]
 


Member Function Documentation

virtual void wxTestCase::Delete   [virtual]
 

Destroys and deallocates the test.

Reimplemented from wxITest.

virtual const char* wxTestCase::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 wxTestCase::GetState   [virtual]
 

Retreive the current TestState of this test.

Returns:
The current TestState of this test.

Reimplemented from wxITest.

virtual void wxTestCase::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 wxTestCase::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.

Reimplemented in wxTestCaseMultiThreaded.

Definition at line 59 of file TestCase.h.

virtual void wxTestCase::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.

Reimplemented in wxTestCaseMultiThreaded.

Definition at line 67 of file TestCase.h.

virtual bool wxTestCase::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 wxTestCase::GetNumSubTests   [inline, virtual]
 

Retreive the number of sub-tests for this test.

Reimplemented from wxITest.

Reimplemented in wxTestCaseMultiThreaded.

Definition at line 80 of file TestCase.h.

virtual void wxTestCase::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.

Reimplemented in wxTestCaseMultiThreaded.

Definition at line 87 of file TestCase.h.

virtual const wxITest* wxTestCase::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* wxTestCase::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 wxTestCase::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 wxTestCase::Setup   [virtual]
 

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

virtual void wxTestCase::TearDown   [virtual]
 

Clean up anything that was allocated in Setup.


Member Data Documentation

char* wxTestCase::m_pszDescription [protected]
 

Definition at line 125 of file TestCase.h.

TestState wxTestCase::m_state [protected]
 

Definition at line 126 of file TestCase.h.

wxITest* wxTestCase::m_pParent [protected]
 

Definition at line 127 of file TestCase.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