From d6beed8d5415117f3ee8b97069f8f810a672f7f0 Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Fri, 3 May 2024 16:31:58 +0200 Subject: [PATCH] add failing test for call/cc --- tests/continuations.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/continuations.scm b/tests/continuations.scm index c24caddae..187897710 100644 --- a/tests/continuations.scm +++ b/tests/continuations.scm @@ -82,6 +82,25 @@ (t.is result '("Hello <0>"))))) +(test.failing "continuations: scope mutation" + (lambda (t) + (define counter '()) + + (define (make-counter n) + (let ((m (call/cc + (lambda (cont) + (begin + (set! counter cont) + 0))))) + (begin + (set! n (+ n 1)) + (+ m n)))) + + (t.is (make-counter 0) 1) + (t.is (counter 0) 2) + (t.is (counter 0) 3))) + + (test.failing "continuations: coroutine generator" (lambda (t) (define (make-coroutine-generator proc)