Loading...
Searching...
No Matches
QUnit::TestReporter Class Reference

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

Inheritance diagram for QUnit::TestReporter:
[legend]

## Public Member Functions

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

## Public Attributes

const | Opts = ...
| default options for Qore::GetOpt::constructor()

## Protected Member Functions

| 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

## Protected Attributes

string | m_name
| test case name
hash< auto > | m_options
| the result of parsing command-line options with Qore::GetOpt::parse2()
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

  name | the name of the test
  version | the version of the test
  p_argv | an optional list of command-line arguments
  opts | the 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

  name | the name of the test
  version | the version of the test
  p_argv | an optional reference to a list of command-line arguments
  opts | the option hash to be passed to Qore::GetOpt::constructor()

## Member Data Documentation

## m_options

hash<auto> QUnit::TestReporter::m_options

protected

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

See also
  - Opts
  - constructor()