ASSERT


debug
Since v1.0.0
Available on all platforms
See also

Evaluates a boolean expression, continues the execution if it is true, stops otherwise.

The ASSERT function consumes a BOOLEAN parameter from the top of the stack. If the boolean is true the execution of the WarpScript script continues, else it stops the execution by throwing an exception.

ASSERT is usually used in WarpScript unit tests.

Signature

Examples

true ASSERT 2 2 + 4 == ASSERT