Changes

Jump to navigation Jump to search
101 bytes added ,  14:22, 7 July 2014
no edit summary
=Functions=
 
{{Mark|Updated with Version 8.0}}: failure argument can now be an arbitrary item.
==unit:assert==
|-
| width='120' | '''Signatures'''
|{{Func|unit:assert|$test as item()*|empty-sequence()}}<br />{{Func|unit:assert|$test as item()*, $message failure as xs:stringitem()|empty-sequence()}}<br />
|-
| '''Summary'''
|Asserts that the effective boolean value of the specified {{Code|$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 {{Code|fn:boolean}} function.<br/>The unit default failure message output can be overridden with the {{Code|$messagefailure}} stringargument.
|-
| '''Errors'''
|-
| width='120' | '''Signatures'''
|{{Func|unit:assert-equals|$returned as item()*, $expected as item()*|empty-sequence()}}<br />{{Func|unit:assert-equals|$returned as item()*, $expected as item()*, $message failure as xs:stringitem()|empty-sequence()}}<br />
|-
| '''Summary'''
|Asserts that the specified arguments are equal according to the rules of the {{Code|fn:deep-equals}} function. Otherwise, raises an error.<br/>The unit default failure message output can be overridden with the {{Code|$messagefailure}} stringargument.
|-
| '''Errors'''
|-
| width='120' | '''Signatures'''
|{{Func|unit:fail|$message failure as xs:stringitem()|empty-sequence()}}<br />
|-
| '''Summary'''
|Raises a unit error with the specified messagefailure item.
|-
| '''Errors'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu