Skip to main content
Version: 1.6.0

assert

module error

let failwith: <a, b>(_: a) => b

Cause the testing framework to fail.

let assert: (_: bool) => unit

The call assert(cond) terminates the execution with the string "failed assertion" if, and only if, the boolean condition cond is false. The failure is handled by LIGO's testing framework and not by Michelson's interpreter.

let some: <a>(_: option<a>) => unit

The call some(opt) terminates the execution with the string "failed assert some" if, and only if, opt is None(). The failure is handled by LIGO's testing framework and not by Michelson's interpreter.

let none: <a>(_: option<a>) => unit

The call none(opt) terminates the execution with the string "failed assert none" if, and only if, opt is not None(). The failure is handled by LIGO's testing framework and not by Michelson's interpreter.