You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
397 B
18 lines
397 B
3 weeks ago
|
#lang racket
|
||
|
|
||
|
(require rackunit "tbd.rkt")
|
||
|
|
||
|
(define hw-tests
|
||
|
(test-suite "scheme unit tests"
|
||
|
|
||
|
(test-case "test my-map"
|
||
|
(begin
|
||
|
(check-equal? (my-map (lambda (x) (* x x)) '(1 2 3)) '(1 4 9))))
|
||
|
|
||
|
(test-case "test co-map"
|
||
|
(begin
|
||
|
(check-equal? (co-map (lambda (x) (* x x)) '(1 2 3)) '(1 4 9))))))
|
||
|
|
||
|
(require rackunit/gui)
|
||
|
(test/gui hw-tests)
|