Search
lxdream.org :: lxdream/test/sh4/testsh4.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/testsh4.c
changeset 231:a9e61a96a885
prev228:70adc8ffa8d1
next233:f8333b94f503
author nkeynes
date Tue Sep 26 11:05:38 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Add BT, BT/S, CMP/EQ, CMP/GE, CMP/GT, CMP/HI, CMP/HS tests
Add general slot-illegal exception test
file annotate diff log raw
1.1 --- a/test/sh4/testsh4.c Mon Sep 25 11:13:56 2006 +0000
1.2 +++ b/test/sh4/testsh4.c Tue Sep 26 11:05:38 2006 +0000
1.3 @@ -5,7 +5,7 @@
1.4
1.5 int test_print_result( char *testname, int failed, int total )
1.6 {
1.7 - fprintf( stderr, "%s: %d/%d tests passed\n", testname, total-failed, total );
1.8 + fprintf( stdout, "%s: %d/%d tests passed\n", testname, total-failed, total );
1.9 total_tests += total;
1.10 total_fails += failed;
1.11 return failed;
1.12 @@ -44,6 +44,7 @@
1.13
1.14 int main()
1.15 {
1.16 + fprintf( stdout, "Instruction tests...\n" );
1.17 install_interrupt_handler();
1.18 test_add();
1.19 test_addc();
1.20 @@ -51,8 +52,16 @@
1.21 test_and();
1.22 test_andi();
1.23 test_bf();
1.24 + test_bt();
1.25 + test_cmp();
1.26 + fprintf( stdout, "--> %d/%d instruction tests passed (%d%%)\n\n",
1.27 + total_tests-total_fails, total_tests,
1.28 + ((total_tests-total_fails)*100)/total_tests );
1.29 +
1.30 + fprintf( stdout, "Exception tests...\n" );
1.31 + test_slot_illegal();
1.32 remove_interrupt_handler();
1.33
1.34 - fprintf( stderr, "Total: %d/%d tests passed (%d%%)\n", total_tests-total_fails,
1.35 + fprintf( stdout, "Total: %d/%d tests passed (%d%%)\n", total_tests-total_fails,
1.36 total_tests, ((total_tests-total_fails)*100)/total_tests );
1.37 }
.