assert
参数参数参数是传给函数的输入,写在函数名后的括号中。
参数
参数是传给函数的输入,写在函数名后的括号中。
定义定义这些函数和类型带有附属定义。要访问这种定义,请先写上函数或类型的名称,再加上定义的名称,并用句点在中间分隔。
定义
这些函数和类型带有附属定义。要访问这种定义,请先写上函数或类型的名称,再加上定义的名称,并用句点在中间分隔。
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.
展开例子
#assert.eq(10, 10)
left
any必需参数必需参数必需参数在调用函数时必须传入。位置参数位置参数位置参数按顺序传入,不带参数名。
any
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。
The first value to compare.
right
any必需参数必需参数必需参数在调用函数时必须传入。位置参数位置参数位置参数按顺序传入,不带参数名。
any
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。
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.
展开例子
#assert.ne(3, 4)
left
any必需参数必需参数必需参数在调用函数时必须传入。位置参数位置参数位置参数按顺序传入,不带参数名。
any
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。
The first value to compare.
right
any必需参数必需参数必需参数在调用函数时必须传入。位置参数位置参数位置参数按顺序传入,不带参数名。
any
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。
The second value to compare.
message
An optional message to display on error instead of the representations of the compared values.