Handbook
Glossary
experiment ( word: ( -- error/f failed? tested? ) line# -- )
Vocabulary
tools
.
test
.
private
Inputs
word
a
quotation
with stack effect
( -- error/f failed? tested? )
line#
an
object
Outputs
None
Definition
USING:
continuations
io
kernel
namespaces
tools.test
;
IN:
tools.test.private
::
experiment
( word: ( -- error/f failed? tested? ) line# -- )
word
<experiment>
:>
e
silent-tests?
get
[
e
experiment.
]
unless
word
execute
[
[
current-test-file
get
[
e
current-test-file
get
line#
notify-test-failed
]
[
rethrow
]
if
]
[
drop
]
if
]
[
2drop
"Warning: test skipped!"
print
]
if
;
inline