Skip to content

Commit

Permalink
add failing test for call/cc
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 3, 2024
1 parent bf5fbb5 commit d6beed8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/continuations.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6beed8

Please sign in to comment.