mes: with-fluids: Fix reset.

* mes/module/mes/fluids.mes (with-fluids): Fix reset.
* tests/fluids.test (report): Remove Mes failure expectation.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-15 10:39:02 +02:00
parent 0feea9ae52
commit 3e5d775b3b
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@
`(let ,(map (lambda (b s) `(,s (,b))) (map car bindings) syms)
,@(map (lambda (o) `(fluid-set! ,(car o) ,(cadr o))) bindings)
(let ((r (begin ,@bodies)))
`,@(map (lambda (b s) `(fluid-set! ,b ,s)) (map car bindings) syms)
,@(map (lambda (b s) `(fluid-set! ,b ,s)) (map car bindings) syms)
r))))
(define (dynamic-wind in-guard thunk out-guard)

View file

@ -51,14 +51,14 @@ exec ${MES-src/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests
;; 0 (with-fluids* (list a b) '(0 1)
;; (lambda () (fluid-ref a))))
(pass-if-equal "with-fluids"
(pass-if-eq "with-fluids"
0 (with-fluids ((a 1)
(a 2)
(a 3))
(fluid-set! a 0)
(fluid-ref a)))
(pass-if-equal "with-fluids" ; FIXME: fails with Mes
(pass-if-eq "with-fluids"
#f (begin
(with-fluids ((a 1)
(b 2))
@ -66,4 +66,4 @@ exec ${MES-src/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests
(display "X:") (display (fluid-ref a)) (newline))
(fluid-ref a)))
(result 'report (if mes? 1 0))
(result 'report)