[plt-scheme] Check-error

From: Jos Koot (jos.koot at telefonica.net)
Date: Thu Apr 15 05:04:54 EDT 2010

Is it me or check-error who is wrong? 

#lang scheme 
(require test-engine/scheme-tests) 

(define coroutine4 
    (lambda (first-resume-value) 
     (toggle 0) 
     (toggle 1) 
     (toggle 2) 
     (error "expired coroutine"))) 
    (lambda (return/resume-value) 
      (lambda (cc) 
       (let ((old-state local-state)) 
        (set! local-state cc) 
        (old-state return/resume-value))))))) 

(check-expect (coroutine4 'ignored) 0) 
(check-expect (coroutine4 'ignored) 1) 
(check-expect (coroutine4 'ignored) 2) 
(check-error (coroutine4 'ignored) "expired coroutine") 


Welcome to DrScheme, version [3m]. 
Language: scheme [custom]; memory limit: 2000 MB. 
bug: collects\test-engine\scheme-tests.ss:157:0: expired coroutine 
Ran 4 checks. 
1 of the 4 checks failed. 

        check-expect encountered the following error instead of the expected
value, 0. 
   :: expired coroutine 
 At line 21 column 0 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100415/64453bc4/attachment.html>

Posted on the users mailing list.