assert
ParameterParameterParameters are input values for functions. Specify them in parentheses after the function name.
Parameter
Parameters are input values for functions. Specify them in parentheses after the function name.
conditionRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
conditionRequired
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.
The condition that must be true for the assertion to pass.
message
messageThe error message when the assertion fails.
DefinitionsDefinitionsThese functions and types can have related definitions. To access a definition, specify the name of the function or type, followed by the definition name separated by a period.
Definitions
These functions and types can have related definitions. To access a definition, specify the name of the function or type, followed by the definition name separated by a period.
eq
eqEnsures that two values are equal.
Fails with an error if the first value is not equal to the second. Does not produce any output in the document.
Show example
#assert.eq(10, 10)
leftanyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
leftany
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.
The first value to compare.
rightanyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
rightany
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.
The second value to compare.
message
messageAn optional message to display on error instead of the representations of the compared values.
ne
neEnsures that two values are not equal.
Fails with an error if the first value is equal to the second. Does not produce any output in the document.
Show example
#assert.ne(3, 4)
leftanyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
leftany
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.
The first value to compare.
rightanyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
rightany
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.
The second value to compare.
message
messageAn optional message to display on error instead of the representations of the compared values.