mod: unit
This commit is contained in:
parent
6b01e44aa4
commit
e5795f9c6a
1 changed files with 10 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
|
|
||||||
# Unit Functions
|
# Unit Functions
|
||||||
|
|
||||||
This BaseX module contains annotations and functions for performing XQUnit tests. Each test is an XQuery function with the `%unit:test` annotation.
|
This BaseX module contains annotations and functions for performing XQUnit tests. A test is an XQuery function with the `%unit:test` annotation.
|
||||||
|
|
||||||
## [Introduction](#introduction)
|
## [Introduction](#introduction)
|
||||||
|
|
||||||
|
|
@ -85,7 +85,9 @@ unit:assert(
|
||||||
$info as item() := ()
|
$info as item() := ()
|
||||||
) as empty-sequence()
|
) as empty-sequence()
|
||||||
|
|
||||||
SummaryAsserts that the effective boolean value of the specified `$test` is true and returns an empty sequence. Otherwise, raises an error. The _effective boolean value_ of an expression can be explicitly computed by using the `fn:boolean` function. The default failure message can be overridden with the `$info` argument.Errors
|
Summary
|
||||||
|
|
||||||
|
Asserts that the effective boolean value of the specified `$test` is true and returns an empty sequence. Otherwise, raises an error. The _effective boolean value_ of an expression can be explicitly computed by using the `fn:boolean` function. The default failure message can be overridden with the `$info` argument.Errors
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
@ -101,7 +103,9 @@ unit:assert-equals(
|
||||||
$info as item() := ()
|
$info as item() := ()
|
||||||
) as empty-sequence()
|
) as empty-sequence()
|
||||||
|
|
||||||
SummaryAsserts that the specified arguments are equal according to the rules of the `[fn:deep-equal](Standard_Functions#fn:deep-equal)` function. Otherwise, raises an error. The default failure message can be overridden with the `$info` argument.Errors
|
Summary
|
||||||
|
|
||||||
|
Asserts that the specified arguments are equal according to the rules of the `[fn:deep-equal](Standard_Functions#fn:deep-equal)` function. Otherwise, raises an error. The default failure message can be overridden with the `$info` argument.Errors
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
@ -115,7 +119,9 @@ unit:fail(
|
||||||
$info as item() := ()
|
$info as item() := ()
|
||||||
) as empty-sequence()
|
) as empty-sequence()
|
||||||
|
|
||||||
SummaryRaises a unit error. The default failure message can be overridden with the `$info` argument.Errors
|
Summary
|
||||||
|
|
||||||
|
Raises a unit error. The default failure message can be overridden with the `$info` argument.Errors
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue