assert: Add _assert_/@class@
This predicates the assertion for each class match. * assert.xml (_assert_)[@class@]: Add parameter.master
parent
1b4ba4c562
commit
0390923825
|
@ -42,6 +42,8 @@
|
||||||
yields~$\top$,
|
yields~$\top$,
|
||||||
only one assertion will ever match,
|
only one assertion will ever match,
|
||||||
even if others would match if execution were to continue.}
|
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---%
|
\ref{_assert_} implements assertions by genearting two classifications---%
|
||||||
one to perform the actual assertion,
|
one to perform the actual assertion,
|
||||||
|
@ -60,6 +62,9 @@
|
||||||
<text>Assertion</text>
|
<text>Assertion</text>
|
||||||
</param>
|
</param>
|
||||||
|
|
||||||
|
<param name="@class@" desc="Only perform assertion for respective class
|
||||||
|
matches (optional)" />
|
||||||
|
|
||||||
|
|
||||||
<param name="@neg_as@"
|
<param name="@neg_as@"
|
||||||
desc="Generated name for classification to be negated">
|
desc="Generated name for classification to be negated">
|
||||||
|
@ -74,7 +79,17 @@
|
||||||
<!-- The actual assertion will be performed by one classification... -->
|
<!-- The actual assertion will be performed by one classification... -->
|
||||||
<classify as="@neg_as@" yields="@neg_yields@"
|
<classify as="@neg_as@" yields="@neg_yields@"
|
||||||
desc="{@failure@} (assertion result)">
|
desc="{@failure@} (assertion result)">
|
||||||
|
<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@" />
|
<param-copy name="@values@" />
|
||||||
|
</all>
|
||||||
|
</any>
|
||||||
</classify>
|
</classify>
|
||||||
|
|
||||||
<!-- ...which is in turn negated for the terminating
|
<!-- ...which is in turn negated for the terminating
|
||||||
|
|
Loading…
Reference in New Issue