racket/collects/2htdp/tests/on-tick-universe-with-limit.rkt
2011-07-16 13:59:55 -04:00

13 lines
414 B
Racket

#lang racket
(require 2htdp/universe 2htdp/image)
(with-handlers ((exn? (lambda (w)
(unless (string=? "stop!: the universe stopped: 3" (exn-message w))
(raise w)))))
(universe 0
(on-tick (lambda (w) (make-bundle (add1 w) '() '())) 1/28 3)
(on-msg void)
(on-new cons))
(error "the universe didn't stop properly"))