8773: I should have run the tests

svn: r6741
This commit is contained in:
Matthias Felleisen 2007-06-26 13:10:42 +00:00
parent c79499e8b6
commit e9a4d3aeb2
8 changed files with 25 additions and 11 deletions

View File

@ -1,5 +1,6 @@
;; test errors by hand in GUI
(load "tester.ss")
(require (lib "convert.ss" "htdp"))
;; f2c : num -> num
;; to convert a Fahrenheit temperature into a Celsius temperature

View File

@ -1,8 +1,11 @@
;; The first three lines of this file were inserted by DrScheme. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname dir) (read-case-sensitive #t) (teachpacks ((lib "dir.ss" "teachpack" "htdp"))) (htdp-settings #8(#t constructor repeating-decimal #f #t none #f ((lib "dir.ss" "teachpack" "htdp")))))
;; TeachPack: dir.ss
;; Language: Intermediate with Lambda
(define current (create-dir "."))
(define teachps (create-dir (string-append "/Users/matthias/plt/" "/teachpack/htdp")))
(define teachps (create-dir (string-append "/Users/matthias/plt/" "collects/teachpack/htdp")))
(define current-files (map file-name (dir-files current)))
(define teachps-files (map file-name (dir-files teachps)))

View File

@ -1,3 +1,6 @@
;; The first three lines of this file were inserted by DrScheme. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname draw) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp"))) (htdp-settings #8(#t constructor repeating-decimal #f #t none #f ((lib "draw.ss" "teachpack" "htdp")))))
;; This tests a good portion but needs some more
;; This needs some tests for error behavior of functions ...

View File

@ -1,6 +1,6 @@
;; The first three lines of this file were inserted by DrScheme. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname world) (read-case-sensitive #t) (htdp-settings #7(#t constructor repeating-decimal #f #t none #f)))
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname world) (read-case-sensitive #t) (teachpacks ((lib "world.ss" "teachpack" "htdp"))) (htdp-settings #8(#t constructor repeating-decimal #f #t none #f ((lib "world.ss" "teachpack" "htdp")))))
;; testing world
;; World = Nat

View File

@ -1,4 +1,4 @@
#cs(module elevator mzscheme
(module elevator mzscheme
(require (lib "big-draw.ss" "htdp")
(lib "error.ss" "htdp")
(lib "posn.ss" "lang")

View File

@ -1,4 +1,4 @@
#cs(module graphing mzscheme
(module graphing mzscheme
(require (lib "error.ss" "htdp")
(lib "unit.ss")
(lib "draw-sig.ss" "htdp")

View File

@ -282,12 +282,18 @@ Matthew
(for-each (lambda (cand)
(check-image 'run-movie cand "first" "list of images"))
movie)
(let run-movie ([movie movie])
(cond [(null? movie) #t]
[(pair? movie)
(update-frame (car movie))
(sleep/yield .05)
(run-movie (cdr movie))])))
(let* ([fst (car movie)]
[wdt (image-width fst)]
[hgt (image-height fst)]
[nxt (lambda (w) (if (null? w) (end-of-time "") (cdr w)))])
(big-bang wdt hgt (/ 1 27) movie)
(let run-movie ([movie movie])
(cond
[(null? movie) #t]
[(pair? movie)
(update-frame (car movie))
(sleep/yield .05)
(run-movie (cdr movie))]))))
(define (run-simulation width height rate f)
(check-pos 'run-simulation width "first")

View File

@ -135,7 +135,8 @@ students to simulate a small world of animated drawings and games:
<li><code>{(idx run-movie)} : (Listof Image) -> true </code><br>
<code>(run-movie loi)</code>
shows the list of images in loi, time-delayed
shows the list of images in loi in a time-delayed manner;
assume: all images are of the same size
</menu></p>
<hr />