.in -5
.sp 1
..
-.de hP
-.IP
-.ft B
-\h'-\w'\\$1\ 'u'\\$1\ \c
-.ft P
-..
-.ie t .ds o \(bu
-.el .ds o o
.TH testrig 3 "5 June 1999" mLib
.SH NAME
testrig \- generic test rig
.VE
The members of this structure are as follows:
.TP
-.I "name"
+.B "const char *name"
The name of the chunk described by this chunk definition, or null if
this is the termination marker.
.TP
-.I "test"
+.B "int (*test)(dstr dv[])"
The test function. It is passed an array of dynamic strings, one for
each field, and must return nonzero if the test succeeded or zero if the
test failed. On success, the function should not write anything to
stdout or stderr; on failure, a report of the test arguments should be
emitted to stderr.
.TP
-.I "f"
+.B "test_type *f[TEST_FIELDMAX]"
Definitions of the fields. This is an array of pointers to
.I "field types"
(see below), terminated by a null pointer.
} test_type;
.VE
The
-.I cvt
+.B cvt
member is a function called to read an input string stored in
-.I buf
+.B buf
and output internal-format data in the dynamic string
.IR d .
The testrig driver has already stripped of quotes and dealt with
backslash escapes.
The
-.I dump
+.B dump
member is called to write the internal-format data in dynamic string
.I d
to the
*(int *)d.buf
.VE
which isn't pretty but does the job.
+.TP
+.B "type_long"
+As for
+.B type_int
+but reads and stores a
+.B long
+instead.
+.TP
+.B "type_ulong"
+As for
+.B type_long
+but reads and stores an
+.B "unsigned long"
+instead.
+.TP
+.B "type_uint32"
+As for
+.B type_int
+but reads and stores a
+.B uint32
+(see
+.BR bits (3))
+instead.
.SH "SEE ALSO"
.BR mLib (3).
.SH "AUTHOR"