[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
srfi 64 vs guile.
From: |
r. clayton |
Subject: |
srfi 64 vs guile. |
Date: |
11 Aug 2006 21:23:57 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
I cut 'n' pasted this code
$ cat t.scm
;; Initialize and give a name to a simple testsuite.
(test-begin "vec-test")
(define v (make-vector 5 99))
;; Require that an expression evaluate to true.
(test-assert (vector? v))
;; Test that an expression is eqv? to some other expression.
(test-eqv (vector-ref v 2) 99)
(vector-set! v 2 7)
(test-eqv (vector-ref v 2) 7)
;; Finish the testsuite, and report results.
(test-end "vec-test")
$
from http://srfi.schemers.org/srfi-64/srfi-64.html and downloaded
http://srfi.schemers.org/srfi-64/testing.scm on that page as srfi-64.scm. Then
I ran guile on a debian testing system updated weekly and did
$ guile
guile> (version)
"1.6.8"
guile> (load "srfi-64.scm")
guile> (load "t.scm")
%%%% Starting test vec-test (Writing full log to "vec-test.log")
FAIL
# of expected passes 2
# of unexpected failures 1
guile> (exit)
$ cat vec-test.log
%%%% Starting test vec-test
Group begin: vec-test
Test begin:
Test end:
result-kind: fail
actual-value: #f
expected-value: #<procedure exp (z)>
Test begin:
Test end:
result-kind: pass
actual-value: 99
expected-value: 99
Test begin:
Test end:
result-kind: pass
actual-value: 7
expected-value: 7
Group end: vec-test
# of expected passes 2
# of unexpected failures 1
$
I'm not understanding why the first test failed; what would be the explanation
for that?
- srfi 64 vs guile.,
r. clayton <=