Qore QUnit Module Reference 0.4.3
Loading...
Searching...
No Matches
QUnit::TestReporter Class Reference

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

#include <QUnit.qm.dox.h>

Inheritance diagram for QUnit::TestReporter:
[legend]

Public Member Methods

 constructor (string name, string version, *list< auto > p_argv, hash< auto > opts=Opts)
 creates the object from the arguments More...
 
 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
 
 init (string name, string version, reference< list< string > > p_argv, hash< auto > opts=Opts)
 common constructor code
 
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
 
*list< auto > new_argv
 new ARGV for languages that don't support lvalue references
 
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() [1/2]

QUnit::TestReporter::constructor ( string  name,
string  version,
*list< auto >  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 list of command-line arguments
optsthe option hash to be passed to Qore::GetOpt::constructor()

◆ constructor() [2/2]

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