Skip to content

Commit 765e3ae

Browse files
committed
Add test for exercise 3-31
1 parent c4805e4 commit 765e3ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

chapter2/exercise2-31.scm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@
1111
(define (square-tree tree) (tree-map square tree))
1212

1313
(define x (list 1 (list 2 (list 3 4) 5)))
14-
(square-tree x); => (1 (4 (9 16) 25))
14+
(module+ test
15+
(require rackunit)
16+
17+
(test-case "Test for square-tree"
18+
(check-equal? (square-tree x) '(1 (4 (9 16) 25))))
19+
)

0 commit comments

Comments
 (0)