clean up of htdp/tests

This commit is contained in:
Matthias Felleisen 2011-02-08 13:21:37 -05:00
parent e71ccdac38
commit eed8ca10cd
4 changed files with 1771 additions and 1749 deletions

View File

@ -1,24 +0,0 @@
;; 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 guess-gui) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
;; TeachPack : guess-gui.ss
;; Language: Beginning
;; ------------------------------------------------------------------------
;; model : button% event% -> true
(define (model x y)
(view (convert (list (control 0) (control 1) (control 2)))))
;; convert : (listof DIGIT) -> number
;; to convert a list of digits into a number
;; the leading digit is the least significant one
(define (convert alod)
(cond
[(empty? alod) 0]
[else (+ (first alod) (* 10 (convert (rest alod))))]))
;; TEST:
(connect model)

View File

@ -1,4 +1,4 @@
;; The first three lines of this file were inserted by DrScheme. They record metadata
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname hangman-error) (read-case-sensitive #t) (teachpacks ((lib "hangman.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ((lib "hangman.ss" "teachpack" "htdp")))))
(define (reveal-list chosen status guess)
@ -11,4 +11,4 @@
(start 200 200)
(check-error (hangman-list reveal-list draw-next-part)
"draw-next-part: result of type <boolean> expected, given: #<void>")
"draw-next-part: result of type <boolean> expected, your function produced #<void>")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff