arithmetic functions should be standard
svn: r14833
This commit is contained in:
parent
dff15857f0
commit
305a38a0c0
|
@ -133,14 +133,6 @@
|
|||
(htdp-test #t 'eq? (eq? #t true))
|
||||
(htdp-test #t 'eq? (eq? #f false))
|
||||
|
||||
(htdp-err/rt-test (+) exn:application:arity?)
|
||||
(htdp-err/rt-test (+ 1) exn:application:arity?)
|
||||
(htdp-err/rt-test (*) exn:application:arity?)
|
||||
(htdp-err/rt-test (* 1) exn:application:arity?)
|
||||
(htdp-err/rt-test (-) exn:application:arity?)
|
||||
(htdp-err/rt-test (/) exn:application:arity?)
|
||||
(htdp-err/rt-test (/ 1) exn:application:arity?)
|
||||
|
||||
(htdp-test -9 '- (- 9))
|
||||
|
||||
(htdp-top (define-struct an-example-structure (first-field second-field)))
|
||||
|
|
|
@ -44,3 +44,15 @@
|
|||
|
||||
(htdp-top-pop 1)
|
||||
(htdp-teachpack-pop)
|
||||
|
||||
(htdp-err/rt-test (+) exn:application:arity?)
|
||||
(htdp-err/rt-test (+ 1) exn:application:arity?)
|
||||
(htdp-err/rt-test (*) exn:application:arity?)
|
||||
(htdp-err/rt-test (* 1) exn:application:arity?)
|
||||
(htdp-err/rt-test (-) exn:application:arity?)
|
||||
(htdp-err/rt-test (/) exn:application:arity?)
|
||||
(htdp-err/rt-test (/ 1) exn:application:arity?)
|
||||
|
||||
(err/rt-test (+) exn:application:arity?)
|
||||
|
||||
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
(htdp-syntax-test #'(lambda (x) 10))
|
||||
|
||||
(htdp-syntax-test #'(lambda (f) (f f)))
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
|
||||
;; These are true for beginner, but the operators are syntax, so
|
||||
;; arity-test doesn't work.
|
||||
(arity-test + 2 -1)
|
||||
(arity-test * 2 -1)
|
||||
(arity-test / 2 -1)
|
||||
(arity-test - 1 -1)
|
||||
|
||||
(htdp-syntax-test #'local)
|
||||
(htdp-syntax-test #'(local))
|
||||
|
@ -108,3 +104,11 @@
|
|||
|
||||
(htdp-err/rt-test (build-string 2 add1)
|
||||
"build-string : second argument must be a <procedure> that produces a <char>, given #<procedure:add1>, which produced 1 for 0")
|
||||
|
||||
(htdp-test 0 '+ (+))
|
||||
(htdp-test 1 '+ (+ 1))
|
||||
(htdp-test 1 '* (*))
|
||||
(htdp-test 1 '* (* 1))
|
||||
;(htdp-test (-) exn:application:arity?)
|
||||
;(htdp-err/rt-test (/) exn:application:arity?)
|
||||
;(htdp-test 1 (/ 1) exn:application:arity?)
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
(test 'id f11 'id)
|
||||
|
||||
(err/rt-test (1 2 3))
|
||||
(err/rt-test (+) exn:application:arity?)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user