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.
condition
RequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
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 condition that must be true for the assertion to pass.
message
The error message when the assertion fails.
DefinitionDefinitionThese 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.
Definition
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
Ensures 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)
left
anyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
any
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.
right
anyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
any
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
An optional message to display on error instead of the representations of the compared values.
ne
Ensures 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)
left
anyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
any
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.
right
anyRequiredRequiredRequired parameters must be specified when calling the function.PositionalPositionalPositional parameters can be set by specifying them in order, omitting the parameter name.
any
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
An optional message to display on error instead of the representations of the compared values.