* srfi 64 vs guile.
@ 2006-08-12 1:23 r. clayton
2006-08-12 5:48 ` Per Bothner
0 siblings, 1 reply; 2+ messages in thread
From: r. clayton @ 2006-08-12 1:23 UTC (permalink / raw)
Cc: srfi-64, 0
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?
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: srfi 64 vs guile.
2006-08-12 1:23 srfi 64 vs guile r. clayton
@ 2006-08-12 5:48 ` Per Bothner
0 siblings, 0 replies; 2+ messages in thread
From: Per Bothner @ 2006-08-12 5:48 UTC (permalink / raw)
Cc: srfi-64, 0, guile-user
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
r. clayton wrote:
> 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
Oops. My fault. Please try the attached patch.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
[-- Attachment #2: testing.patch --]
[-- Type: text/x-patch, Size: 901 bytes --]
Index: testing.scm
===================================================================
--- testing.scm (revision 5381)
+++ testing.scm (working copy)
@@ -646,7 +646,6 @@
(let ()
(if (%test-on-test-begin r)
(let ()
- (test-result-set! r 'expected-value exp)
(let ((res (%test-evaluate-with-catch expr)))
(test-result-set! r 'actual-value res)
(%test-on-test-end r res))))
@@ -725,11 +724,11 @@
(let* ((r (test-runner-get))
(name tname))
(test-result-alist! r '((test-name . tname)))
- (%test-comp1body r expr)))
+ (%test-comp1body r test-expression)))
((test-assert test-expression)
(let* ((r (test-runner-get)))
(test-result-alist! r '())
- (%test-comp1body r expr)))))
+ (%test-comp1body r test-expression)))))
(define-syntax %test-comp2
(syntax-rules ()
((%test-comp2 comp tname expected expr)
[-- Attachment #3: Type: text/plain, Size: 140 bytes --]
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-12 5:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-12 1:23 srfi 64 vs guile r. clayton
2006-08-12 5:48 ` Per Bothner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).