【发布时间】:2013-09-18 03:42:53
【问题描述】:
我是一个完整的方案初学者,想知道测试用例是什么,甚至是做什么。 例如,如果我想为我已经编码和测试过的负根二次函数编写一个测试用例,我该怎么做?
(define (quadnegative a b c)
(* (/ (+ (sqrt (-(square b) (* 4 a c))) b) 2 a) -1))
;Value: quadnegative
(quadnegative 1 3 -4)
;Value: -4
提前谢谢你。
【问题讨论】:
标签: scheme