Search
lxdream.org :: lxdream/test/testdata.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/testdata.h
changeset 190:f7653df5e832
prev185:6755a04c447f
next263:6f641270b2aa
author nkeynes
date Wed Jan 03 09:00:17 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Adjust timers when they're read rather than waiting until the next time
slice. Also temporarily cut the CPU time by 4.
Initialize the FRQCR register to 0x0E0A for convenience
view annotate diff log raw
     1 /*
     2  * $Id: testdata.h,v 1.2 2006-08-02 04:13:15 nkeynes Exp $
     3  * 
     4  * Test data loader
     5  *
     6  * Copyright (c) 2006 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 #include <stdio.h>
    21 #define MAX_DATA_BLOCKS 16
    23 typedef struct test_data_block {
    24     const char *name;
    25     unsigned int length;
    26     char *data;
    27 } *test_data_block_t;
    29 typedef struct test_data {
    30     const char *test_name;
    31     struct test_data *next;
    32     struct test_data_block item[MAX_DATA_BLOCKS];
    33 } *test_data_t;
    35 test_data_t load_test_dataset( FILE *f );
    36 void free_test_dataset( test_data_t dataset );
    37 void dump_test_dataset( FILE *f, test_data_t dataset );
    38 int test_block_compare( test_data_block_t expect, char *actual, int actual_length );
    39 test_data_block_t get_test_data( test_data_t dataset, char *item_name );
.