From 3e5d775b3b883a9d09b366c4a392fe4582661a02 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 15 Oct 2018 10:39:02 +0200 Subject: [PATCH] mes: with-fluids: Fix reset. * mes/module/mes/fluids.mes (with-fluids): Fix reset. * tests/fluids.test (report): Remove Mes failure expectation. --- mes/module/mes/fluids.mes | 2 +- tests/fluids.test | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mes/module/mes/fluids.mes b/mes/module/mes/fluids.mes index 77ffcd23..a415c247 100644 --- a/mes/module/mes/fluids.mes +++ b/mes/module/mes/fluids.mes @@ -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) diff --git a/tests/fluids.test b/tests/fluids.test index ac87572e..5fce8e87 100755 --- a/tests/fluids.test +++ b/tests/fluids.test @@ -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)