racket/collects/htdp/Test/graphing.ss
Matthias Felleisen fb644c1caf relevant teachpacks converted
svn: r9470
2008-04-25 00:50:03 +00:00

17 lines
703 B
Scheme

;; 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-beginner-reader.ss" "lang")((modname graphing) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(require (lib "graphing.ss" "htdp"))
(define (fun1 x) (+ (* x x) 1))
(check-expect (graph-fun fun1 'red) true)
(define (fun2 x) (+ (* -1 x x) 1))
(check-expect (graph-fun fun2 'blue) true)
(define (line1 x) (+ (* +1 x) 10))
(check-expect (graph-line line1 'black) true)
(define (line2 x) (+ (* -1 x) 10))
(check-expect (graph-line line2 'green) true)