}
}
-void tvec_reportgroup(struct tvec_state *tv)
+static void report_group(struct tvec_state *tv)
{
unsigned i, out, nrun;
else {
if (tv->curr[TVOUT_LOSE]) out = TVOUT_LOSE;
else out = TVOUT_WIN;
- tv->grps[out]++; tv->output->ops->egroup(tv->output, out);
+ tv->grps[out]++; tv->output->ops->egroup(tv->output);
}
}
if (!t) return;
if (tv->f&TVSF_OPEN) check(tv, g);
- if (!(tv->f&TVSF_SKIP)) tvec_reportgroup(tv);
+ if (!(tv->f&TVSF_SKIP)) report_group(tv);
env = t->env; if (env && env->teardown) env->teardown(tv, g->ctx);
release_registers(tv); tv->test = 0; xfree(g->ctx); g->ctx = 0;
}
tv_out->tests = config->tests; tv_out->test = 0;
tv_out->infile = 0; tv_out->lno = 0; tv_out->fp = 0;
- o->tv = tv_out; tv_out->output = o;
-
- tv_out->output->ops->bsession(tv_out->output);
+ tv_out->output = o; tv_out->output->ops->bsession(tv_out->output, tv_out);
}
int tvec_end(struct tvec_state *tv)
void tvec_endgroup(struct tvec_state *tv)
{
- if (!(tv->f&TVSF_SKIP)) tvec_reportgroup(tv);
+ if (!(tv->f&TVSF_SKIP)) report_group(tv);
tv->test = 0;
}
if (ck->f&ACF_FRESH) tvec_endtest(tv);
}
-int tvec_claim(struct tvec_state *tv, int ok,
- const char *file, unsigned lno, const char *expr, ...)
+int tvec_claim_v(struct tvec_state *tv, int ok,
+ const char *file, unsigned lno,
+ const char *msg, va_list *ap)
{
struct adhoc_claim ck;
- va_list ap;
adhoc_claim_setup(tv, &ck, 0, file, lno);
- if (!ok)
- { va_start(ap, expr); tvec_fail_v(tv, expr, &ap); va_end(ap); }
+ if (!ok) tvec_fail_v(tv, msg, ap);
adhoc_claim_teardown(tv, &ck);
return (ok);
}
+int tvec_claim(struct tvec_state *tv, int ok,
+ const char *file, unsigned lno, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg); tvec_claim_v(tv, ok, file, lno, msg, &ap); va_end(ap);
+ return (ok);
+}
+
int tvec_claimeq(struct tvec_state *tv,
const struct tvec_regty *ty, const union tvec_misc *arg,
const char *file, unsigned lno, const char *expr)