PonyTest

Main test framework actor that organises tests, collates information and prints results.

actor tag PonyTest

Constructors

create

new tag create(
  env: Env val,
  list: TestList tag)
: PonyTest tag^

Parameters

Returns


Public Behaviours

apply

Run the given test, subject to our filters and options.

be apply(
  test: UnitTest iso)

Parameters


Private Behaviours

_test_started

A test has started running, update status info. The id parameter is the test identifier handed out when we created the test helper.

be _test_started(
  id: USize val)

Parameters


_test_complete

A test has completed, restore its result and update our status info. The id parameter is the test identifier handed out when we created the test helper.

be _test_complete(
  id: USize val,
  pass: Bool val,
  log: Array[String val] val)

Parameters


_all_tests_applied

All our tests have been handed to apply(), setup for finishing

be _all_tests_applied()

Private Functions

_find_group

Find the group to use for the given group name, subject to the --sequential flag.

fun ref _find_group(
  group_name: String val)
: _Group tag

Parameters

Returns


_process_opts

Process our command line options. All command line arguments given must be recognised and make sense. State for specified options is stored in object fields. We don't use the options package because we aren't already dependencies.

fun ref _process_opts()
: None val

Returns


_print_report

The tests are all complete, print out the results.

fun box _print_report()
: None val

Returns


_plural

Return a "s" or an empty string depending on whether the given number is 1. For use when printing possibly plural words, eg "test" or "tests".

fun box _plural(
  n: USize val)
: String val

Parameters

Returns