;;;;;;;;;;;;;;;;;;; TEST CASES: L0 ;;;;;;;;;;;;;;;; ;;; The following is used by 'hw06-test-helpers.ss': (define tests ; Each entry in the list is either ; [str val] (where val is the result of interpreting the string str), or ; [str val expr] (as above, but expr is the internal (struct) representation. ; (You might need to adjust that third field, if you use a different ; internal representation than my solution.) `{["7" 7 7] ["{plus 3 4}" 7 ,(make-sum 3 4)] ["{times 3 4}" 12 ,(make-prod 3 4)] ["{plus {plus 3 4} {times 3 4}}" 19] ["{ifZero 0 1 2}" 1 ,(make-ifZero 0 1 2)] ["{ifZero 1 1 2}" 2 ,(make-ifZero 1 1 2)] ["{ifZero {plus 3 -3} 1 2}" 1 ,(make-ifZero (make-sum 3 -3) 1 2)] ["{ifZero {plus {ifZero {ifZero 0 1 2} 3 4} -3} 1 2}" 2 ,(make-ifZero (make-sum (make-ifZero (make-ifZero 0 1 2) 3 4) -3) 1 2)] })