From fb7d948794ce424950c3a52ab65b3b1c0acddfbb Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Tue, 4 Jan 2011 12:40:14 -0500 Subject: [PATCH] Revised test cases that used big-bang so they don't actually run when loaded (so drdr doesn't complain about timeouts). --- .../tests/map-image-isl-tests.rkt | 4 +++- .../tests/rotating-triangle.rkt | 20 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/collects/picturing-programs/tests/map-image-isl-tests.rkt b/collects/picturing-programs/tests/map-image-isl-tests.rkt index 584f0add7b..d203bc52fe 100644 --- a/collects/picturing-programs/tests/map-image-isl-tests.rkt +++ b/collects/picturing-programs/tests/map-image-isl-tests.rkt @@ -81,4 +81,6 @@ (build-image 100 100 diamond-color) -(big-bang bloch (on-draw show-it) (on-tick myfuzz 1)) \ No newline at end of file +(define (animation-test dummy) + (big-bang bloch (on-draw show-it) (on-tick myfuzz 1))) +"Run (animation-test 'blah) to test myfuzz as tick handler." \ No newline at end of file diff --git a/collects/picturing-programs/tests/rotating-triangle.rkt b/collects/picturing-programs/tests/rotating-triangle.rkt index bf3a98b142..1d836d1d30 100644 --- a/collects/picturing-programs/tests/rotating-triangle.rkt +++ b/collects/picturing-programs/tests/rotating-triangle.rkt @@ -13,24 +13,32 @@ (define (rotate-1 pic) (rotate 1 pic)) -"Triangle rotating by itself (with its top and left attached to the top and left of the window):" +;Triangle rotating by itself (with its top and left attached to the top and left of the window): +(define (test1 dummy) (big-bang TRI (on-tick rotate-1 .05) (check-with image?) - (on-draw show-it)) + (on-draw show-it))) -"Triangle rotating around its center:" +;Triangle rotating around its center: +(define (test2 dummy) (big-bang tricirc (on-tick rotate-1 .05) (check-with image?) - (on-draw show-it)) + (on-draw show-it))) ;show-on-yellow : image -> image (define (show-on-yellow pic) (overlay pic (rectangle (* 2 R) (* 2 R) "solid" "yellow"))) -"Triangle rotating around its center, on a yellow background:" +;Triangle rotating around its center, on a yellow background: +(define (test3 dummy) (big-bang tricirc (on-tick rotate-1 .05) (check-with image?) - (on-draw show-on-yellow)) + (on-draw show-on-yellow))) + +"Triangle rotating by itself (with its top and left attached to the top +and left of the window): (test1 'blah)" +"Triangle rotating around its center: (test2 'blah)" +"Triangle rotating around its center, on a yellow background: (test3 'blah)"