racket/pkgs/htdp-pkgs/htdp-test/2htdp/tests/stop-when-not-boolean.rkt
2013-10-04 15:11:15 -04:00

13 lines
439 B
Racket

#lang racket
;; ---------------------------------------------------------------------------------------------------
;; the stop-when clause crashes. make sure that it signals a catchable error.
(require 2htdp/universe 2htdp/image)
(with-handlers ((exn:fail? void))
(big-bang 0
(on-draw (λ _ (empty-scene 500 500)))
(stop-when (λ _ 5)))
(displayln '(*** SOMETHING WENT WRONG IN STOP-WHEN NOT BOOLEAN ***)))