unittest::fail_or_die

Command: unittest::fail_or_die


Description

This procedure is provided to test that certain errors are raised e.g. when
illegal values are set.

Author
H. E. Plesser

Synopsis
{ code } fail_or_die -> -
{ code } string fail_or_die -> -

Examples

/unittest (7391) require
/unittest using
{ 1 0 div } fail_or_die
{ 0 << /resolution 0 >> SetStatus} fail_or_die
endusing

File
lib/sli/unittest.sli
Diagnostics

This function will quit nest if the code does NOT raise an error
(exit code 3). It will print an error message to cerr too.

FirstVersion