Next: Guile Test State Reference, Up: Guile Test Reference [Contents][Index]
This type represents a test case.
It encapsulates micro_benchmark_test_case
underneath and a
reference to the suite to controls its lifetime. Note that this name
is not exported by the module, but objects of this type are returned
by the following function.
Preconditions:
make-suite
.
(string? name)
is #t
.
#:set-up
is provided, (set-up <state-object>)
is a
valid call. If it isn’t provided, the value returned by the default
set-up function is (get-sizes <state-object>)
.
#:tear-down
is provided, (tear-down <state-object>
(set-up <state-object>))
is a valid call.
#:direct
is provided and it isn’t #f
, (apply
test <state-object2> (set-up <state-object1>))
, being
test the value provided through #:test
, must be a valid
call.
#:direct
is not provided or it is #f
, (apply
test (set-up <state-object>))
, being test the value
provided through #:test
, is a valid call.
#:dimensions
is provided, its value is a list of lists of
non-negative integers.
#:skip-iterations!
, #:min-iterations
,
#:max-iterations
, #:min-sample-iterations
or
#:max-sample-iterations
is provided, its value is a
non-negative integer.
#:max-time
is provided, its value is either a non-negative
integer or a pair of non-negative integers.
Effects:
name
.
Postconditions:
test-case?
returns #t
on the returned
value.
#:dimensions
was provided, the returned test has the value
provided as size its constraints.
#:skip-iterations!
was provided, the returned test will
perform this number of of iterations before start taking measurements.
#:min-iterations
or #:max-iterations was provided, the
returned test will perform a number of iterations in the range
[min, max], being min the value provided to
#:min-iterations
or zero, and max. the value provided to
#:max-iterations
or an implementation upper limit.
#:min-sample-iterations
or #:max-sample-iterations was
provided, the returned test will perform number of iterations per
measurement sample in the range [min, max], being
min the value provided to #:min-sample-iterations
or
zero, and max. the value provided to
#:max-sample-iterations
or an implementation upper limit.
#:max-time
was provided, its value will be used as the time
limit of the registered test.
Preconditions:
Effects:
<test-case>
.
Postconditions:
#t
if object is of type
<test-case>
.
Preconditions:
add-test!
.
#:skip-iterations!
, #:min-iterations
,
#:max-iterations
, #:min-sample-iterations
or
#:max-sample-iterations
is provided, its value is a
non-negative integer.
Effects:
#:skip-iterations!
was provided, any previous value of
iterations to skip stops taking effect.
#:min-iterations
or #:max-iterations was provided, any
previous iteration limit value stops taking effect.
#:min-sample-iterations
or #:max-sample-iterations was
provided, any previous sample iteration limit value stops taking
effect.
Postconditions:
#:skip-iterations!
was provided, this will be number of
iterations performed on the test code represented by test
before taking measurements.
#:min-iterations
or #:max-iterations was provided, the
number of iterations performed by test will be [min,
max], being min the value provided to
#:min-iterations
or zero, and max. the value provided to
#:max-iterations
or an implementation upper limit.
#:min-sample-iterations
or #:max-sample-iterations was
provided, the number of iterations per measurement sample performed by
test will be [min, max], being min the value
provided to #:min-sample-iterations
or zero, and max. the
value provided to #:max-sample-iterations
or an implementation
upper limit.
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
#:min
or #:max
is provided, its value must be a
non-negative integer.
Effects:
Postconditions:
#:min
or
zero, and max. the value provided to #:max
or an
implementation upper limit.
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
#:min
or #:max
is provided, its value must be a
non-negative integer.
Effects:
Postconditions:
#:min
or zero, and max. the value provided to
#:max
or an implementation upper limit.
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
Effects:
Postconditions:
Preconditions:
add-test!
.
Effects:
car
value as the number of
seconds of the time limit and its cdr
value as the number of
milliseconds.
Postconditions:
Preconditions:
add-test!
.
Effects:
Postconditions:
The following function does not return a <test-case>
object.
The tests registered by this function are executed by the main
function (see Guile Utilities Reference.)
Preconditions:
(string? name)
is #t
.
#:set-up
is provided, (set-up <state-object>)
is a
valid call. If it isn’t provided, the value returned by the default
set-up function is (get-sizes <state-object>)
.
#:tear-down
is provided, (tear-down <state-object>
(set-up <state-object>))
is a valid call.
#:direct
is provided and it isn’t #f
, (apply
test <state-object2> (set-up <state-object1>))
, being
test the value provided through #:test
, must be a valid
call.
#:direct
is not provided or it is #f
, (apply
test (set-up <state-object>))
, being test the value
provided through #:test
, is a valid call.
#:dimensions
is provided, it must be a list of lists of
non-negative integers.
#:skip-iterations!
, #:min-iterations
,
#:max-iterations
, #:min-sample-iterations
or
#:max-sample-iterations
is provided, the value provided is
non-negative integers.
#:max-time
is provided, its value is either a non-negative
integer or a pair of non-negative integers.
Effects:
name
.
Postconditions:
main
.
Next: Guile Test State Reference, Up: Guile Test Reference [Contents][Index]