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

wxTestRunner Class Reference

#include <TestRunner.h>

Inheritance diagram for wxTestRunner::

wxITestRunner wxTestRunnerMT List of all members.

Public Methods

 wxTestRunner ()
virtual ~wxTestRunner ()
virtual void wxtstdout (const char *psz,...)
 Captures "standard out" which is informational text output from tests. More...

virtual void BeginTestCase (wxITest *pTest)
 Called by the test framework before a unit test is run. More...

virtual void EndTestCase (wxITest *pTest)
 Called by the test framework after a unit test is run. More...

virtual void OnTestFailure (wxITest *pTest, const char *pszMessage, const char *pszFile, unsigned long nLineNo)
 Called by the test framework when a test fails. More...

virtual wxString GetQualifiedTestDescription (wxITest *pTest)
virtual void LoadTests ()
virtual void OnFoundTestModule (wxTestModule &pTest)
virtual void OnTestAdded (wxITest *pTest)
virtual void SpawnThreads (wxITest *)
 Implementations of test-runners can implement this function to spawn additional threads to run test cases in a multi-threaded envoriment to check for thread saftey. More...

virtual void BeginTests ()
virtual void OnTestOutput (wxITest *pTest, const char *pszOutput)
virtual void OnErrorOutput (const char *pszOutput)
virtual int GetNumTestsRun ()
 Retreives the number of individual test-cases run thus far. More...

virtual int GetNumFailures ()
 Retreives the number of failures that have occured thus far. More...

wxITestGetTestRoot ()
virtual void GetOutputSubdir (wxITest *pTest, char *pszBuffer, bool bCreate)
virtual wxString GetOutputSubdir ()
virtual void SetOutputSubDir (wxString strNewOutputSubDir)

Protected Methods

virtual void OpenFiles (wxITest *pTest)
virtual void CloseFiles ()

Protected Attributes

FILE * m_stdout
wxITestm_pCurrentTest
wxTestModulem_modules
int m_nModuleCount
int m_nModuleCapacity
int m_nFailures
int m_nFailuresThisTestCase
int m_nTestsRun
wxString m_strLibDir
wxString m_strOutputDir
wxTestSuitem_pRootTest

Constructor & Destructor Documentation

wxTestRunner::wxTestRunner  
 

virtual wxTestRunner::~wxTestRunner   [virtual]
 


Member Function Documentation

virtual void wxTestRunner::wxtstdout const char *    psz,
...   
[virtual]
 

Captures "standard out" which is informational text output from tests.

If tests create any "standard out" output, then it must be identical each time the test is run.

Reimplemented from wxITestRunner.

virtual void wxTestRunner::BeginTestCase wxITest   pTest [virtual]
 

Called by the test framework before a unit test is run.

Reimplemented from wxITestRunner.

virtual void wxTestRunner::EndTestCase wxITest   pTest [virtual]
 

Called by the test framework after a unit test is run.

Reimplemented from wxITestRunner.

virtual void wxTestRunner::OnTestFailure wxITest   pTest,
const char *    pszMessage,
const char *    pszFile,
unsigned long    nLineNo
[virtual]
 

Called by the test framework when a test fails.

This function is overridden in specialized implementation of test-runners to perform specific tasks (e.g., to update the test runner's user interface or write to a log).

Parameters:
pTest  The test that's currently running.
pszMessage  A human-readable message that describes the failure.
pszFile  The source file in which the failure occured.
nLineNo  The line number at which the failure occured.

Reimplemented from wxITestRunner.

virtual wxString wxTestRunner::GetQualifiedTestDescription wxITest   pTest [virtual]
 

virtual void wxTestRunner::LoadTests   [virtual]
 

virtual void wxTestRunner::OnFoundTestModule wxTestModule   pTest [virtual]
 

virtual void wxTestRunner::OnTestAdded wxITest   pTest [virtual]
 

virtual void wxTestRunner::SpawnThreads wxITest   [virtual]
 

Implementations of test-runners can implement this function to spawn additional threads to run test cases in a multi-threaded envoriment to check for thread saftey.

This function is typically called from an a test's 'Run( wxITestRunner* )' function. It should spawn multiple threads and call the test's 'Run( wxITestRunner*, int nThreadId )' function

Parameters:
wxITest  The test currently running.

Reimplemented from wxITestRunner.

Reimplemented in wxTestRunnerMT.

virtual void wxTestRunner::BeginTests   [virtual]
 

virtual void wxTestRunner::OnTestOutput wxITest   pTest,
const char *    pszOutput
[virtual]
 

virtual void wxTestRunner::OnErrorOutput const char *    pszOutput [virtual]
 

virtual int wxTestRunner::GetNumTestsRun   [virtual]
 

Retreives the number of individual test-cases run thus far.

Returns:
The number of individual test-cases run thus far.

Reimplemented from wxITestRunner.

virtual int wxTestRunner::GetNumFailures   [virtual]
 

Retreives the number of failures that have occured thus far.

Returns:
The number of faulures that have occured thus far.

Reimplemented from wxITestRunner.

wxITest* wxTestRunner::GetTestRoot  
 

virtual void wxTestRunner::GetOutputSubdir wxITest   pTest,
char *    pszBuffer,
bool    bCreate
[virtual]
 

virtual wxString wxTestRunner::GetOutputSubdir   [virtual]
 

virtual void wxTestRunner::SetOutputSubDir wxString    strNewOutputSubDir [virtual]
 

virtual void wxTestRunner::OpenFiles wxITest   pTest [protected, virtual]
 

virtual void wxTestRunner::CloseFiles   [protected, virtual]
 


Member Data Documentation

FILE* wxTestRunner::m_stdout [protected]
 

Definition at line 91 of file TestRunner.h.

wxITest* wxTestRunner::m_pCurrentTest [protected]
 

Definition at line 92 of file TestRunner.h.

wxTestModule* wxTestRunner::m_modules [protected]
 

Definition at line 95 of file TestRunner.h.

int wxTestRunner::m_nModuleCount [protected]
 

Definition at line 96 of file TestRunner.h.

int wxTestRunner::m_nModuleCapacity [protected]
 

Definition at line 97 of file TestRunner.h.

int wxTestRunner::m_nFailures [protected]
 

Definition at line 99 of file TestRunner.h.

int wxTestRunner::m_nFailuresThisTestCase [protected]
 

Definition at line 100 of file TestRunner.h.

int wxTestRunner::m_nTestsRun [protected]
 

Definition at line 101 of file TestRunner.h.

wxString wxTestRunner::m_strLibDir [protected]
 

Definition at line 102 of file TestRunner.h.

wxString wxTestRunner::m_strOutputDir [protected]
 

Definition at line 103 of file TestRunner.h.

wxTestSuite* wxTestRunner::m_pRootTest [protected]
 

Definition at line 104 of file TestRunner.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