~ chicken-core (chicken-5) 5f5243170df37ebc7dfc41f56ff48f49f1975ca5
commit 5f5243170df37ebc7dfc41f56ff48f49f1975ca5
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Apr 28 10:04:37 2011 -0400
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Thu Apr 28 10:04:37 2011 -0400
some testsuite fixes
diff --git a/tests/fft.scm b/tests/fft.scm
index 6f6a4235..a0030619 100644
--- a/tests/fft.scm
+++ b/tests/fft.scm
@@ -2083,7 +2083,7 @@
(make-f64vector (fx* two^n 2) 0.)))
(do ((i 0 (fx+ i 1)))
((fx= i iters)
- (write table) (newline)
+ ;(write table) (newline)
)
(direct-fft-recursive-4 a table)
(inverse-fft-recursive-4 a table)))))
diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected
index c33165bd..d919b18b 100644
--- a/tests/scrutiny.expected
+++ b/tests/scrutiny.expected
@@ -45,10 +45,4 @@ Warning: at toplevel:
Warning: at toplevel:
g89: in procedure call to `g89', expected a value of type `(procedure () *)', but was given a value of type `fixnum'
-Warning: in toplevel procedure `foo':
- expected value of type boolean in conditional but were given a value of
-type `(procedure bar24 () *)' which is always true:
-
-(if bar24 '3 (##core#undefined))
-
Warning: redefinition of standard binding: car
diff --git a/tests/specialization-test-1.scm b/tests/specialization-test-1.scm
index 5e79327f..5faaf120 100644
--- a/tests/specialization-test-1.scm
+++ b/tests/specialization-test-1.scm
@@ -1,7 +1,7 @@
;;;; specialization-test-1.scm
-(module foo (foo)
+(module foo (foo bar)
(import scheme chicken foreign)
#>
@@ -11,14 +11,22 @@ n += i;
return n;}
<#
-(: foo (fixnum -> fixnum)
- ((fixnum) (##core#inline "inlined" #(1))))
+(: foo (fixnum -> fixnum))
(define (foo i)
(print "foo: " i)
0)
-(assert (zero? (foo 1.0)))
-(assert (= 1 (foo 1)))
+(: bar (number -> fixnum)
+ ((fixnum) (##core#inline "inlined" #(1))))
+
+(define (bar i)
+ (print "bar: " i)
+ 0)
+
+(handle-exceptions ex #f (foo 1.0)) ; failed type-check
+(assert (zero? (foo 1)))
+(assert (zero? (bar 1.0)))
+(assert (= 1 (bar 1)))
)
diff --git a/tests/specialization-test-2.scm b/tests/specialization-test-2.scm
index dafb7774..db894aa0 100644
--- a/tests/specialization-test-2.scm
+++ b/tests/specialization-test-2.scm
@@ -2,7 +2,7 @@
(module main ()
-(import scheme chicken foreign foo)
+(import scheme chicken foreign foo) ; note: does not load foo!
#>
static int inlined(int i) {
@@ -11,6 +11,6 @@ n += i;
return n;}
<#
-(assert (= 1 (foo 1)))
+(assert (= 1 (bar 1)))
)
Trap