clean up of htdp/tests
This commit is contained in:
parent
e71ccdac38
commit
eed8ca10cd
|
@ -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)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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.
|
;; 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")))))
|
#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)
|
(define (reveal-list chosen status guess)
|
||||||
|
@ -11,4 +11,4 @@
|
||||||
|
|
||||||
(start 200 200)
|
(start 200 200)
|
||||||
(check-error (hangman-list reveal-list draw-next-part)
|
(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
Loading…
Reference in New Issue
Block a user