FreeNOS
Public Member Functions | Private Attributes
TAPReporter Class Reference

Output TestResults in TAP format to stdout. More...

#include <TAPReporter.h>

Inheritance diagram for TAPReporter:
TestReporter

Public Member Functions

 TAPReporter (int argc, char **argv)
 Constructor. More...
 
virtual void reportBegin (List< TestInstance * > &tests)
 Report start of testing. More...
 
virtual void reportBefore (TestInstance &test)
 Report start of a test. More...
 
virtual void reportAfter (TestInstance &test, TestResult &result)
 Report finish of a test. More...
 
virtual void reportFinish (List< TestInstance * > &tests)
 Report completion of all tests. More...
 
- Public Member Functions inherited from TestReporter
 TestReporter (int argc, char **argv)
 Constructor. More...
 
virtual ~TestReporter ()
 Destructor. More...
 
uint getOk () const
 Get OK count. More...
 
uint getFailed () const
 Get fail count. More...
 
uint getSkipped () const
 Get skip count. More...
 
void setReport (bool value)
 Set reporting on/off. More...
 
void setStatistics (bool value)
 Set final statistics on/off. More...
 
void setMultiline (bool value)
 Set multine mode on/off. More...
 
virtual void prepare (TestInstance &test)
 Prepare for next test. More...
 
virtual void collect (TestInstance &test, TestResult &result)
 Collect test statistics. More...
 
virtual void begin (List< TestInstance * > &tests)
 Begin testing. More...
 
virtual void finish (List< TestInstance * > &tests)
 Finish testing. More...
 

Private Attributes

uint m_count
 Test counter. More...
 

Additional Inherited Members

- Protected Attributes inherited from TestReporter
int m_argc
 Argument count. More...
 
char ** m_argv
 Argument values. More...
 
bool m_report
 Report on/off. More...
 
bool m_statistics
 Final statistics on/off. More...
 
bool m_multiline
 Multi line output. More...
 
uint m_ok
 Test statistics. More...
 
uint m_fail
 
uint m_skip
 

Detailed Description

Output TestResults in TAP format to stdout.

See also
https://testanything.org/tap-specification.html

Definition at line 36 of file TAPReporter.h.

Constructor & Destructor Documentation

◆ TAPReporter()

TAPReporter::TAPReporter ( int  argc,
char **  argv 
)

Constructor.

Definition at line 23 of file TAPReporter.cpp.

References m_count.

Member Function Documentation

◆ reportAfter()

void TAPReporter::reportAfter ( TestInstance test,
TestResult result 
)
virtual

◆ reportBefore()

void TAPReporter::reportBefore ( TestInstance test)
virtual

Report start of a test.

Implements TestReporter.

Definition at line 39 of file TAPReporter.cpp.

◆ reportBegin()

void TAPReporter::reportBegin ( List< TestInstance * > &  tests)
virtual

Report start of testing.

Implements TestReporter.

Definition at line 29 of file TAPReporter.cpp.

References List< T >::count(), TestReporter::m_argv, TestReporter::m_multiline, and printf().

◆ reportFinish()

void TAPReporter::reportFinish ( List< TestInstance * > &  tests)
virtual

Report completion of all tests.

Implements TestReporter.

Definition at line 70 of file TAPReporter.cpp.

References TestReporter::m_fail, TestReporter::m_multiline, TestReporter::m_ok, TestReporter::m_skip, and printf().

Field Documentation

◆ m_count

uint TAPReporter::m_count
private

Test counter.

Definition at line 68 of file TAPReporter.h.

Referenced by reportAfter(), and TAPReporter().


The documentation for this class was generated from the following files: