Loading

ASSERT

debug

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.

ASSERT is available since version 1.0.0.

See also

Signatures

Examples

true ASSERT 2 2 + 4 == ASSERT