chiark / gitweb /
@@@ tty mess
[mLib] / utils / t / control-test.c
index cc88bfeaa73a11f780d47f6ba98b99c86e3063b1..51edc04a6be58af012d4165eade6af4b967a83ca 100644 (file)
 
 #include "control.h"
 #include "report.h"
 
 #include "control.h"
 #include "report.h"
+
 #include "tvec.h"
 #include "tvec.h"
+#include "tvec-adhoc.h"
+#include "tvec-types.h"
 
 /*----- Main code ---------------------------------------------------------*/
 
 
 /*----- Main code ---------------------------------------------------------*/
 
@@ -41,9 +44,9 @@ static struct tvec_state tvstate;
 static int step;
 
 #define TESTGROUP(name)                                                        \
 static int step;
 
 #define TESTGROUP(name)                                                        \
-       TVEC_TESTGROUP(tg, &tvstate, name)                              \
+       TVEC_TESTGROUP_TAG(grp, &tvstate, name)                         \
        MC_BEFORE(init, { step = 0; })
        MC_BEFORE(init, { step = 0; })
-#define TEST TVEC_TEST(test, &tvstate)
+#define TEST TVEC_TEST_TAG(test, &tvstate)
 #define STEP(s) do {                                                   \
          tvec_claim(&tvstate, s == step, __FILE__, __LINE__,           \
                     "found %d /= expected %d", s, step);               \
 #define STEP(s) do {                                                   \
          tvec_claim(&tvstate, s == step, __FILE__, __LINE__,           \
                     "found %d /= expected %d", s, step);               \
@@ -57,13 +60,11 @@ static int step;
 
 int main(int argc, char *argv[])
 {
 
 int main(int argc, char *argv[])
 {
-  struct tvec_test test;
   int argpos;
   int i;
 
   tvec_parseargs(argc, argv, &tvstate, &argpos, &tvec_adhocconfig);
   if (argpos < argc) die(2, "no input files expected");
   int argpos;
   int i;
 
   tvec_parseargs(argc, argv, &tvstate, &argpos, &tvec_adhocconfig);
   if (argpos < argc) die(2, "no input files expected");
-  tvec_adhoc(&tvstate, &test);
 
   TESTGROUP("before-after") {
     MC_BEFORE(before0, STEP(0)) STEP(1);
 
   TESTGROUP("before-after") {
     MC_BEFORE(before0, STEP(0)) STEP(1);
@@ -183,7 +184,7 @@ int main(int argc, char *argv[])
     FOR_FIZZBUZZ(fb, 19, 32)
       TEST
        if (TVEC_CLAIM(&tvstate, ref[i]))
     FOR_FIZZBUZZ(fb, 19, 32)
       TEST
        if (TVEC_CLAIM(&tvstate, ref[i]))
-         { TVEC_CLAIMEQ_STRZ(&tvstate, fb, ref[i]); i++; }
+         { TVEC_CLAIMEQ_TEXTZ(&tvstate, fb, ref[i]); i++; }
     TVEC_CLAIM(&tvstate, !ref[i]);
   }
 
     TVEC_CLAIM(&tvstate, !ref[i]);
   }