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

wxITest Class Reference

wxITest is the base interface for all tests. More...

#include <ITest.h>

Inheritance diagram for wxITest::

wxTestBase wxTestCase wxTestSuite wxTestCaseMultiThreaded wxTestCaller List of all members.

Public Types

enum  TestState { unknown, running, pass, fail }
 The current state of this test. More...


Public Methods

virtual void Delete ()=0
 Destroys and deallocates the test, recursively if necessary. More...

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

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

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

virtual void Run (wxITestRunner *pResult)=0
 Called by the test-runner to begin execution of the test in a single-threaded context. More...

virtual void Run (wxITestRunner *pResult, long unsigned nThreadId)=0
 Called by the test-runner to begin execution of the test in a multi-threaded context. More...

virtual bool IsThreadSafe ()=0
 Enables the test-runner to determine if this test is intended to be thread-safe. More...

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

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

virtual const wxITest * GetParent () const=0
 Retreive the parent of this test. More...

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


Detailed Description

wxITest is the base interface for all tests.

This includes individual test cases and test suites. This class consists of nothing but pure virtual functions.

Definition at line 29 of file ITest.h.


Member Enumeration Documentation

enum wxITest::TestState
 

The current state of this test.

A test may be in one of the following states:

unknown: the test hasn't yet been run
running: the test has been started and has not yet finished
pass: the test has completed and it passed
fail: the test has completed and it failed

Enumeration values:
unknown 
running 
pass 
fail 

Definition at line 53 of file ITest.h.


Member Function Documentation

virtual void wxITest::Delete   [pure virtual]
 

Destroys and deallocates the test, recursively if necessary.

Reimplemented in wxTestBase, wxTestCase, and wxTestSuite.

virtual const char* wxITest::GetDescription   [pure virtual]
 

Retreive a short human-readable description of this test.

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

Reimplemented in wxTestBase, wxTestCase, and wxTestSuite.

virtual TestState wxITest::GetState   [pure virtual]
 

Retreive the current TestState of this test.

See the TestState enum.

Returns:
The current TestState of this test.

Reimplemented in wxTestBase, wxTestCase, and wxTestSuite.

virtual void wxITest::SetState TestState    newState [pure 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 in wxTestBase, wxTestCase, and wxTestSuite.

virtual void wxITest::Run wxITestRunner   pResult [pure virtual]
 

Called by the test-runner to begin execution of the test in a single-threaded context.

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

Reimplemented in wxTestBase, wxTestCase, wxTestCaseMultiThreaded, and wxTestSuite.

virtual void wxITest::Run wxITestRunner   pResult,
long unsigned    nThreadId
[pure virtual]
 

Called by the test-runner to begin execution of the test in a multi-threaded context.

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 in wxTestBase, wxTestCase, wxTestCaseMultiThreaded, and wxTestSuite.

virtual bool wxITest::IsThreadSafe   [pure virtual]
 

Enables the test-runner to 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 in wxTestBase, wxTestCase, and wxTestSuite.

virtual int wxITest::GetNumSubTests   [pure virtual]
 

Retreive the number of sub-tests for this test.

Reimplemented in wxTestBase, wxTestCase, wxTestCaseMultiThreaded, and wxTestSuite.

virtual void wxITest::GetSubTests wxITest **    pOutTests [pure virtual]
 

Retreive the child-tests of this test.

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

Reimplemented in wxTestBase, wxTestCase, wxTestCaseMultiThreaded, and wxTestSuite.

virtual const wxITest* wxITest::GetParent   const [pure 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 in wxTestBase, wxTestCase, and wxTestSuite.

virtual wxITest* wxITest::GetParent   [pure virtual]
 

Reimplemented in wxTestBase, wxTestCase, and wxTestSuite.

virtual void wxITest::SetParent wxITest *    pParent [pure virtual]
 

Assign a new parent to this test.

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

Reimplemented in wxTestBase, wxTestCase, and wxTestSuite.


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