未翻訳
このページはまだ翻訳されていません。原文の内容が表示されています。
assert
引数Parameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
定義Functions and types and can have associated definitions. These are accessed by specifying the function or type, followed by a period, and then the definition's name.
Functions and types and can have associated definitions. These are accessed by specifying the function or type, followed by a period, and then the definition's name.
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
anyRequiredRequired parameters must be specified when calling the function.PositionalPositional parameters are specified in order, without names.
any
Required
Required parameters must be specified when calling the function.
Positional
Positional parameters are specified in order, without names.
The first value to compare.
right
anyRequiredRequired parameters must be specified when calling the function.PositionalPositional parameters are specified in order, without names.
any
Required
Required parameters must be specified when calling the function.
Positional
Positional parameters are specified in order, without names.
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
anyRequiredRequired parameters must be specified when calling the function.PositionalPositional parameters are specified in order, without names.
any
Required
Required parameters must be specified when calling the function.
Positional
Positional parameters are specified in order, without names.
The first value to compare.
right
anyRequiredRequired parameters must be specified when calling the function.PositionalPositional parameters are specified in order, without names.
any
Required
Required parameters must be specified when calling the function.
Positional
Positional parameters are specified in order, without names.
The second value to compare.
message
An optional message to display on error instead of the representations of the compared values.