another *SL error-message repair

This commit is contained in:
Matthew Flatt 2012-06-12 05:58:16 +08:00
parent c108fe5c6a
commit 82943df351
3 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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")

View File

@ -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.