16.2. Asserting errors in expressions

To make sure that an expression gives an error when the user gives the wrong parameters to a function, use the .asserterror directive:

.asserterror "Test1" , 20/10
.asserterror "Test2" , 20/false

In the above example test1 will fail since its perfectly legal to divide 20 by 10. Test2 will produce the expected error so this assertion is ok. The above will give the following output:

Test1 – ERROR IN ASSERTION!
  Test2 – OK. | Can’t get a numeric representation from a value of type boolean