X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/0875b58fcccadd756e11487185c2ac1d3ed8ab4d..000b43226136f84870dd23e0637e0aeba25f420e:/testrig.h diff --git a/testrig.h b/testrig.h index c8fa10b..e0e471c 100644 --- a/testrig.h +++ b/testrig.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: testrig.h,v 1.1 1998/06/17 23:44:42 mdw Exp $ + * $Id: testrig.h,v 1.6 1999/12/10 23:41:37 mdw Exp $ * * Generic test driver * @@ -12,30 +12,46 @@ * This file is part of the mLib utilities library. * * mLib is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. * * mLib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Library General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with mLib; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Library General Public + * License along with mLib; if not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. */ /*----- Revision history --------------------------------------------------* * * $Log: testrig.h,v $ - * Revision 1.1 1998/06/17 23:44:42 mdw - * Initial revision + * Revision 1.6 1999/12/10 23:41:37 mdw + * Support for different sizes and types of integers. + * + * Revision 1.5 1999/11/16 15:03:31 mdw + * Mark test types as constant. + * + * Revision 1.4 1999/07/06 19:15:28 mdw + * Comment out argument in structure definition. + * + * Revision 1.3 1999/05/06 19:51:35 mdw + * Reformatted the LGPL notice a little bit. + * + * Revision 1.2 1999/05/05 18:50:31 mdw + * Change licensing conditions to LGPL. + * + * Revision 1.1.1.1 1998/06/17 23:44:42 mdw + * Initial version of mLib * */ -#ifndef TESTER_H -#define TESTER_H +#ifndef MLIB_TESTER_H +#define MLIB_TESTER_H #ifdef __cplusplus extern "C" { @@ -45,6 +61,7 @@ #include +#include "bits.h" #include "dstr.h" /*----- Magical numbers ---------------------------------------------------*/ @@ -64,15 +81,18 @@ typedef struct test_type { typedef struct test_chunk { const char *name; /* Name of this chunk */ - int (*test)(dstr dv[]); /* Test verification function */ - test_type *f[TEST_FIELDMAX]; /* Field definitions */ + int (*test)(dstr /*dv*/[]); /* Test verification function */ + const test_type *f[TEST_FIELDMAX]; /* Field definitions */ } test_chunk; /*----- Predefined data types ---------------------------------------------*/ -extern test_type type_hex; -extern test_type type_string; -extern test_type type_int; +extern const test_type type_hex; +extern const test_type type_string; +extern const test_type type_int; +extern const test_type type_long; +extern const test_type type_ulong; +extern const test_type type_uint32; /*----- Functions provided ------------------------------------------------*/