Search
lxdream.org :: lxdream/test/testide.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/testide.c
changeset 263:6f641270b2aa
prev258:8864fae65928
next561:533f6b478071
author nkeynes
date Tue Feb 13 08:34:27 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Add tests for FLOAT and FTRC
Comment out user-mode exception test (broken)
file annotate diff log raw
1.1 --- a/test/testide.c Fri Dec 29 00:23:16 2006 +0000
1.2 +++ b/test/testide.c Tue Feb 13 08:34:27 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: testide.c,v 1.5 2006-12-29 00:23:16 nkeynes Exp $
1.6 + * $Id: testide.c,v 1.6 2007-01-03 09:05:13 nkeynes Exp $
1.7 *
1.8 * IDE interface test cases. Covers all (known) IDE registers in the
1.9 * 5F7000 - 5F74FF range including DMA, but does not cover any GD-Rom
1.10 @@ -22,6 +22,7 @@
1.11
1.12 #include <stdlib.h>
1.13 #include <stdio.h>
1.14 +#include "testdata.h"
1.15 #include "lib.h"
1.16 #include "ide.h"
1.17 #include "asic.h"
1.18 @@ -552,8 +553,6 @@
1.19
1.20 /********************************* Main **************************************/
1.21
1.22 -typedef int (*test_func_t)();
1.23 -
1.24 test_func_t test_fns[] = { test_enable, test_reset, test_packet,
1.25 test_dma, test_dma_abort, test_read_pio,
1.26 test_read_toc,
1.27 @@ -563,17 +562,5 @@
1.28 {
1.29 int i;
1.30 ide_init();
1.31 -
1.32 - /* run tests */
1.33 - for( i=0; test_fns[i] != NULL; i++ ) {
1.34 - test_count++;
1.35 - if( test_fns[i]() != 0 ) {
1.36 - fprintf( stderr, "Test %d failed\n", i+1 );
1.37 - test_failures++;
1.38 - }
1.39 - }
1.40 -
1.41 - /* report */
1.42 - fprintf( stderr, "%d/%d tests passed!\n", test_count - test_failures, test_count );
1.43 - return test_failures;
1.44 + return run_tests( test_fns );
1.45 }
.