+/* --- @tvec_xfail@ --- *
+ *
+ * Arguments: @struct tvec_state *tv@ = test-vector state
+ *
+ * Returns: ---
+ *
+ * Use: Mark the current test as an `expected failure'. That is, the
+ * behaviour -- if everything works as expected -- is known to
+ * be incorrect, perhaps as a result of a longstanding bug, so
+ * calling it a `success' would be inappropriate. A failure, as
+ * reported by @tvec_fail@, means that the behaviour is not as
+ * expected -- either the long-standing bug has been fixed, or a
+ * new bug has been introduced -- so investigation is required.
+ *
+ * An expected failure doesn't cause the test group or the
+ * session as a whole to fail, but it isn't counted as a win
+ * either.
+ */
+
+void tvec_xfail(struct tvec_state *tv)
+ { tv->f |= TVSF_XFAIL; }
+
+/* --- @check@ --- *
+ *
+ * Arguments: @struct tvec_state *tv@ = test-vector state
+ * @struct groupstate *g@ = private test group state
+ *
+ * Returns: ---
+ *
+ * Use: Run the current test.
+ *
+ * This function is called once the data for a test has been
+ * collected. It's responsible for checking that all of the
+ * necessary registers have been assigned values. It marks the
+ * output registers as live if the corresponding inputs are
+ * live. It calls the environment's @before@, @run@, and
+ * @after@ functions if provided; if there is no @run@ function,
+ * it calls @tvec_check@ to verify the output values.
+ */
+
+static void check(struct tvec_state *tv, struct groupstate *g)