<syntaxhighlight lang="xquery">
declare %unit:test function local:void() { () };
</syntaxhighlightpre>
* The following test will be successful, as the function body will raise <code>err:XPTY0004</code>:
<syntaxhighlight lang="xquery">
123 + 'strings and integers cannot be added'
};
</syntaxhighlightpre>
|}
unit:assert(db:exists('test-db'))
};
</syntaxhighlightpre>
|}
()
};
</syntaxhighlightpre>
By running {{Code|TEST tests.xqm}}, the following report will be generated (timings may differ):
</testsuite>
</testsuites>
</syntaxhighlightpre>
=Errors=