assert
Syntax
assert <expr>
or
assert <subCase>, <expr>
Arguments
subCase a string
expr a Boolean expression
Details
Mainly used for unit testing. It prints testing result only if the testing case fails.
Examples
$ @testing: case = "inner product"
assert [1,2,3]**[4,5,6]==32;
$ assert [1,2,3]**[4,5,6]==33;
Testing case inner product failed
$ assert 1==2;
Testing case adhocTesting failed
$ @testing: case = "equal"
assert "one", 1==2
assert "two", 3==4