another *SL error-message repair
This commit is contained in:
parent
c108fe5c6a
commit
82943df351
|
@ -65,7 +65,7 @@
|
|||
(unless (= found arity)
|
||||
(raise-syntax-error
|
||||
#f
|
||||
(argcount-error-message arity found)
|
||||
(argcount-error-message #f arity found)
|
||||
stx
|
||||
#f))
|
||||
(datum->syntax-object
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
(htdp-err/rt-test (/) "/: expects at least 2 arguments, but found none")
|
||||
(htdp-err/rt-test (+ 1) #rx"^[+]: expects at least 2 arguments, but found only 1$")
|
||||
|
||||
(htdp-top (define (f x) x))
|
||||
(htdp-syntax-test #'(f 1 2) "f: expects only 1 argument, but found 2")
|
||||
(htdp-top-pop 1)
|
||||
|
||||
(htdp-syntax-test #'(local [(define x 5)] x) "local: this function is not defined")
|
||||
(htdp-syntax-test #'(recur name ([x 18]) x) "recur: this function is not defined")
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
(htdp-err/rt-test (pi) #px"function call: expected a function after the open parenthesis, but received 3[.]14\\d+$")
|
||||
(htdp-err/rt-test (pi 1 2) #px"function call: expected a function after the open parenthesis, but received 3[.]14\\d+\n arguments:\n 1\n 2$")
|
||||
|
||||
(htdp-top (define (f x) x))
|
||||
(htdp-err/rt-test (f 1 2) "f: expects only 1 argument, but found 2")
|
||||
(htdp-top-pop 1)
|
||||
|
||||
;; These are true for beginner, but the operators are syntax, so
|
||||
;; arity-test doesn't work.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user