filename | test/testdata.h |
changeset | 185:6755a04c447f |
next | 190:f7653df5e832 |
author | nkeynes |
date | Tue Jul 11 01:35:27 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | First commit of system test framework. 3 initial test cases (incomplete): testide, testmath, and testta |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/test/testdata.h Tue Jul 11 01:35:27 2006 +00001.3 @@ -0,0 +1,40 @@1.4 +/*1.5 + * $Id: testdata.h,v 1.1 2006-07-11 01:35:23 nkeynes Exp $1.6 + *1.7 + * Test data loader1.8 + *1.9 + * Copyright (c) 2006 Nathan Keynes.1.10 + *1.11 + * This program is free software; you can redistribute it and/or modify1.12 + * it under the terms of the GNU General Public License as published by1.13 + * the Free Software Foundation; either version 2 of the License, or1.14 + * (at your option) any later version.1.15 + *1.16 + * This program is distributed in the hope that it will be useful,1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.19 + * GNU General Public License for more details.1.20 + */1.21 +1.22 +#include <stdio.h>1.23 +1.24 +#define MAX_DATA_BLOCKS 41.25 +1.26 +typedef struct test_data_block {1.27 + const char *name;1.28 + unsigned int length;1.29 + char *data;1.30 +} *test_data_block_t;1.31 +1.32 +typedef struct test_data {1.33 + const char *test_name;1.34 + struct test_data *next;1.35 + struct test_data_block item[MAX_DATA_BLOCKS];1.36 +} *test_data_t;1.37 +1.38 +test_data_t load_test_dataset( FILE *f );1.39 +void free_test_dataset( test_data_t dataset );1.40 +void dump_test_dataset( FILE *f, test_data_t dataset );1.41 +int test_block_compare( test_data_block_t expect, char *actual, int actual_length );1.42 +test_data_block_t get_test_data( test_data_t dataset, char *item_name );1.43 +
.