assert: Add _assert_/@class@

This predicates the assertion for each class match.

* assert.xml (_assert_)[@class@]: Add parameter.
master
Mike Gerwitz 2018-01-12 09:36:07 -05:00
parent 1b4ba4c562
commit 0390923825
1 changed files with 16 additions and 1 deletions

View File

@ -42,6 +42,8 @@
yields~$\top$,
only one assertion will ever match,
even if others would match if execution were to continue.}
\tt{@class@} may optionally be used to predicate the asseriton itself---%
the assertion will be performed only on respective class matches.
\ref{_assert_} implements assertions by genearting two classifications---%
one to perform the actual assertion,
@ -60,6 +62,9 @@
<text>Assertion</text>
</param>
<param name="@class@" desc="Only perform assertion for respective class
matches (optional)" />
<param name="@neg_as@"
desc="Generated name for classification to be negated">
@ -74,7 +79,17 @@
<!-- The actual assertion will be performed by one classification... -->
<classify as="@neg_as@" yields="@neg_yields@"
desc="{@failure@} (assertion result)">
<param-copy name="@values@" />
<any>
<!-- if class is provided and does not match, then the assertion
succeeds automatically -->
<if name="@class@">
<t:match-class name="@class@" value="FALSE" />
</if>
<all>
<param-copy name="@values@" />
</all>
</any>
</classify>
<!-- ...which is in turn negated for the terminating