Qore QUnit Module Reference  0.4.1
QUnit::TestReporter Class Reference

Base class for collecting test results and reporting. More...

Inheritance diagram for QUnit::TestReporter:

Public Member Methods

 constructor (string name, string version, *reference< list< string >> p_argv, hash< auto > opts=Opts)
 creates the object from the arguments More...
 

Public Attributes

const Opts
 default options for Qore::GetOpt::constructor()
 

Private Member Methods

 addTestResult (TestCase tc, int success, *string error, *string pos, *string detail)
 adds a test result
 
int errors ()
 returns the number of errors encountered during test execution
 
int skipped ()
 returns the number of tests skipped
 
int testCount ()
 returns the total number of test results
 

Private Attributes

string m_name
 test case name
 
hash< auto > m_options
 the result of parsing command-line options with Qore::GetOpt::parse2() More...
 
hash< string, hash< string, code > > m_printMethods
 A map of print methods, categorised into three types: header, summary, testreport.
 
string m_version
 test case version
 
int num_asserts = 0
 total number of assertions in script
 
int num_asserts_ok = 0
 total number of successful assertions in script
 
int num_asserts_skip = 0
 total number of skipped assertions in script
 
const OffsetColumn = 20
 the default column offset for printing options used in printOption() and usageIntern()
 

Detailed Description

Base class for collecting test results and reporting.

Member Function Documentation

◆ constructor()

QUnit::TestReporter::constructor ( string  name,
string  version,
*reference< list< string >>  p_argv,
hash< auto >  opts = Opts 
)

creates the object from the arguments

Parameters
namethe name of the test
versionthe version of the test
p_argvan optional reference to a list of command-line arguments
optsthe option hash to be passed to Qore::GetOpt::constructor()

Member Data Documentation

◆ m_options

hash<auto> QUnit::TestReporter::m_options
private

the result of parsing command-line options with Qore::GetOpt::parse2()

See also