Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

Test Runner Functions


Detailed Description

Functions that are used to define, start, report on, and complete test runners.


Defines

#define XTESTS_START_RUNNER(name, verbosity)
 Starts a test runner that will report to stdout.
#define XTESTS_START_RUNNER_WITH_SETUP_FNS(name, verbosity, setup, teardown, setupParam)
 Starts a test runner that will report to stdout.
#define XTESTS_START_RUNNER_WITH_STREAM(name, verbosity, stm)
 Starts a test runner.
#define XTESTS_START_RUNNER_WITH_REPORTER(name, verbosity, reporter, reporterParam)
 Starts a test runner with the given callback reporter.
#define XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM(name, verbosity, reporter, reporterParam, stm)
 Starts a test runner with the given callback reporter.
#define XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM_AND_FLAGS(name, verbosity, reporter, reporterParam, stm, flags)
 Starts a test runner with the given callback reporter.
#define XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM_AND_FLAGS_AND_SETUP_FNS(name, verbosity, reporter, reporterParam, stm, flags, setup, teardown, setupParam)
 Starts a test runner with the given callback reporter.
#define XTESTS_START_RUNNER_WITH_FLAGS(name, verbosity, flags)
 Starts a test runner that will report to stdout.
#define XTESTS_PRINT_RESULTS()
 Prints the test results of the currently executing test.
#define XTESTS_END_RUNNER()
 Ends a test runner.
#define XTESTS_ABEND(terminationMessage)
 Abnormal end of tests, and process termination.
#define XTESTS_END_RUNNER_UPDATE_EXITCODE(retCode)
 Ends a test runner, and modifies a caller-supplied exit code parameter.

Enumerations

enum  xtests_runner_flags_t
 Flags to be passed to xtests_startRunner. More...
enum  xtests_verbosity_t {
  XTESTS_VERBOSITY_SILENT = -1,
  XTESTS_VERBOSITY_RUNNER_SUMMARY_ON_ERROR = 0,
  XTESTS_VERBOSITY_RUNNER_SUMMARY = 1,
  XTESTS_VERBOSITY_FIRST_CASE_SUMMARY_ON_ERROR = 2,
  XTESTS_VERBOSITY_CASE_SUMMARY_ON_ERROR = 3,
  XTESTS_VERBOSITY_CASE_SUMMARY = 4,
  XTESTS_VERBOSITY_VERBOSE = 9
}
 The verbosity level to be applied when executing a test runner. More...


Define Documentation

#define XTESTS_ABEND ( terminationMessage   ) 

Value:

\
    XTESTS_NS_C_QUAL(xtests_abend)(terminationMessage)
Abnormal end of tests, and process termination.

 
#define XTESTS_END_RUNNER (  ) 

Value:

\
    XTESTS_NS_C_QUAL(xtests_endRunner)(NULL)
Ends a test runner.

#define XTESTS_END_RUNNER_UPDATE_EXITCODE ( retCode   ) 

Value:

\
    stlsoft_static_cast(void, XTESTS_NS_C_QUAL(xtests_endRunner)(retCode))
Ends a test runner, and modifies a caller-supplied exit code parameter.

Parameters:
retCode A pointer to a variable of type int that will receive an exit code.
Remarks:
The variable should have been initialised to EXIT_SUCCESS, and each invocation of XTESTS_END_RUNNER_UPDATE_EXITCODE() (for each separate test-runner in a given application) will only set it to EXIT_FAILURE in the case where that runner has failed one or more tests.

 
#define XTESTS_PRINT_RESULTS (  ) 

Value:

\
    XTESTS_NS_C_QUAL(xtests_printRunnerResults)()
Prints the test results of the currently executing test.

Note:
This can only be invoked after a successful invocation of XTESTS_START_RUNNER() or XTESTS_START_RUNNER_WITH_REPORTER(), and before invocation of XTESTS_END_RUNNER() or XTESTS_END_RUNNER_UPDATE_EXITCODE().

#define XTESTS_START_RUNNER ( name,
verbosity   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), NULL, NULL, NULL, 0, NULL, NULL, NULL))
Starts a test runner that will report to stdout.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed

#define XTESTS_START_RUNNER_WITH_FLAGS ( name,
verbosity,
flags   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), NULL, NULL, NULL, (flags), NULL, NULL, NULL))
Starts a test runner that will report to stdout.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
flags The flags that moderate the runner behaviour

#define XTESTS_START_RUNNER_WITH_REPORTER ( name,
verbosity,
reporter,
reporterParam   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), (reporter), (reporterParam), NULL, 0, NULL, NULL, NULL))
Starts a test runner with the given callback reporter.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
reporter The reporter instance
reporterParam A caller-supplied parameter that is passed with every callback

#define XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM ( name,
verbosity,
reporter,
reporterParam,
stm   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), (reporter), (reporterParam), stm, 0, NULL, NULL, NULL))
Starts a test runner with the given callback reporter.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
reporter The reporter instance
reporterParam A caller-supplied parameter that is passed with every callback
stm The stream to which output will be written

#define XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM_AND_FLAGS ( name,
verbosity,
reporter,
reporterParam,
stm,
flags   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), (reporter), (reporterParam), (stm), (flags), NULL, NULL, NULL))
Starts a test runner with the given callback reporter.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
reporter The reporter instance
reporterParam A caller-supplied parameter that is passed with every callback
stm The stream to which output will be written
flags The flags that moderate the runner behaviour

#define XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM_AND_FLAGS_AND_SETUP_FNS ( name,
verbosity,
reporter,
reporterParam,
stm,
flags,
setup,
teardown,
setupParam   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), (reporter), (reporterParam), (stm), (flags), (setup), (teardown), (setupParam)))
Starts a test runner with the given callback reporter.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
reporter The reporter instance
reporterParam A caller-supplied parameter that is passed with every invocation of the reporter
stm The stream to which output will be written
flags The flags that moderate the runner behaviour
setup The function to be called before each test
teardown The function to be called after each test
setupParam A caller-supplied parameter that is passed with each invocation of the setup and teardown functions

#define XTESTS_START_RUNNER_WITH_SETUP_FNS ( name,
verbosity,
setup,
teardown,
setupParam   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), NULL, NULL, NULL, 0, (setup), (teardown), (setupParam)))
Starts a test runner that will report to stdout.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
setup The function to be called before each test
teardown The function to be called after each test
setupParam A caller-supplied parameter that is passed with each invocation of the setup and teardown functions
See also:
xTests_Setup_t

xTests_Teardown_t

#define XTESTS_START_RUNNER_WITH_STREAM ( name,
verbosity,
stm   ) 

Value:

\
    (0 == XTESTS_NS_C_QUAL(xtests_startRunner)((name), (verbosity), NULL, NULL, stm, 0, NULL, NULL, NULL))
Starts a test runner.

A test runner is a logically-related group of test cases.

Parameters:
name The name of the test-runner
verbosity The verbosity (see xtests_verbosity_t) at which the runner will be executed
stm The stream to which output will be written


Enumeration Type Documentation

enum xtests_runner_flags_t

Flags to be passed to xtests_startRunner.

See also:
XTESTS_START_RUNNER_WITH_FLAGS()

XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM()

XTESTS_START_RUNNER_WITH_REPORTER_AND_FLAGS()

XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM_AND_FLAGS()

XTESTS_START_RUNNER_WITH_SETUP_FNS()

XTESTS_START_RUNNER_WITH_REPORTER_AND_STREAM_AND_FLAGS_AND_SETUP_FNS()

enum xtests_verbosity_t

The verbosity level to be applied when executing a test runner.

Verbosity affects the output from an xTests test program. Output comes in the following forms:

See also:
XTESTS_START_RUNNER()

XTESTS_START_RUNNER_WITH_REPORTER()

Enumerator:
XTESTS_VERBOSITY_SILENT  There is no output of any kind; status must be indicated by program return code
XTESTS_VERBOSITY_RUNNER_SUMMARY_ON_ERROR  Outputs only a runner summary only on error
XTESTS_VERBOSITY_RUNNER_SUMMARY  Outputs only a runner summary
XTESTS_VERBOSITY_FIRST_CASE_SUMMARY_ON_ERROR  Outputs a runner summary and the first case summary only on error
XTESTS_VERBOSITY_CASE_SUMMARY_ON_ERROR  Outputs a runner summary and a summary for each test case in error
XTESTS_VERBOSITY_CASE_SUMMARY  Outputs a runner summary and a summary for each test case
XTESTS_VERBOSITY_VERBOSE  Maximum amount of output


b64 Library documentation © Synesis Software Pty Ltd, 2004-2012