41. Assert once¶
The assert_once module implements single-time assertion infrastructure.
All functions and symbols are in “assert_once” module, use require to get access to it.
require daslib/assert_once
41.1. Function annotations¶
-
AssertOnceMacro
¶
This macro convert assert_once(expr,message) to the following code:
var __assert_once_I = true // this is a global variable
if __assert_once_I && !expr
__assert_once_I = false
assert(false,message)