Next: , Up: Guile API Reference   [Contents][Index]


6.1 Guile Suite Reference

The suite functionality is provided by the module (mbenchmark suite). The following names are provided:

Guile Foreign Object: <suite>

This type represents a test suite. Its starting state is empty.

It encapsulates micro_benchmark_suite underneath and controls its lifetime. Note that this name is not exported by the module; the name <suite> is only for reference.


Guile Constructor: make-suite name

Preconditions:

  1. (string? name) is #t.

Effects:

  1. Creation of a new suite with name as its name.

Postconditions:

  1. The predicate suite? returns #t on the returned value.

Guile Predicate: suite? object

Preconditions:

  1. None.

Effects:

  1. Check if object type is <suite>.

Postconditions:

  1. The value returned is #t if object is of type <suite>.

Guile Function: suite-name suite

Preconditions:

  1. suite was created by make-suite.

Effects:

  1. None.

Postconditions:

  1. The value returned is the name provided to make-suite.

Guile Function: suite-number-of-tests suite

Preconditions:

  1. suite was created by make-suite.

Effects:

  1. None.

Postconditions:

  1. The value returned is the name provided to make-suite.

Guile Function: run-suite! suite

Preconditions:

  1. suite was created by make-suite.
  2. run-suite has not been called on suite.

Effects:

  1. The test cases registered onto the suite are executed.

Postconditions:

  1. The suite contains a report.

Guile Function: get-report suite

Preconditions:

  1. suite was created by make-suite.
  2. run-suite has been called on suite.

Effects:

  1. None.

Postconditions:

  1. The returned value contains the information gathered during the suite execution.


Next: Guile Test Reference, Up: Guile API Reference   [Contents][Index]