update HtDP *SL tests for revised error-message convention

This change does not yet update the *SL error-message rewriter
to recognize the new error-message formats; the tests do not
currently use the rewriter. A next step is to decide on the
rewritings, implement them, change the test suite to use the
rewriter, and test the rewritings.
This commit is contained in:
Matthew Flatt 2012-05-26 08:05:12 -06:00
parent 5b80fd37c7
commit 413c940fe6
4 changed files with 5 additions and 5 deletions

View File

@ -75,7 +75,7 @@
(htdp-test #t 'a3? (a3? (make-a3 1 2 3)))
(htdp-test #f 'a1? (a1? (make-a3 1 2 3)))
(htdp-test #f 'a3? (a3? (make-a1 1)))
(htdp-err/rt-test (a1-b 10) "a1-b: expects argument of type <struct:a1>; given: 10")
(htdp-err/rt-test (a1-b 10) "a1-b: contract violation\n expected: a1[?]\n given: 10")
(htdp-syntax-test #'(a0 1 2 3) "a0: expected a function after the open parenthesis, but found a structure name")
(htdp-syntax-test #'cond "cond: expected an open parenthesis before cond, but found none")

View File

@ -34,7 +34,7 @@
(htdp-top (define (my-f x) x))
(htdp-top (define-struct foo (a b)))
(htdp-syntax-test #'(go 5 8) "go: expects a function in this position at: 8 in: (go 5 8)")
(htdp-syntax-test #'(go 5 8) "go: expects a function in this position\n at: 8\n in: (go 5 8)")
(htdp-syntax-test #'(go add1 add1) "add1: expected a function call, but there is no open parenthesis before this function")
(htdp-syntax-test #'(go my-f add1) "my-f: expected a function call, but there is no open parenthesis before this function")
(htdp-syntax-test #'(go foo? add1) "foo?: expected a function call, but there is no open parenthesis before this function")

View File

@ -28,4 +28,4 @@
(htdp-syntax-test #'unquote-splicing "unquote-splicing: misuse of ,@ or unquote-splicing, not under a quasiquoting backquote")
(htdp-syntax-test #'(unquote-splicing (list 10)) "unquote-splicing: misuse of ,@ or unquote-splicing, not under a quasiquoting backquote")
(htdp-err/rt-test `(,@4) (exn-type-and-msg exn:fail:contract? "append: expected argument of type <proper list>; given: 4"))
(htdp-err/rt-test `(,@4) (exn-type-and-msg exn:fail:contract? "append: contract violation\n expected: list?\n given: 4"))

View File

@ -112,8 +112,8 @@
(htdp-test 1 '+ (+ 1))
(htdp-test 1 '* (*))
(htdp-test 1 '* (* 1))
(htdp-err/rt-test (-) (exn-type-and-msg exn:application:arity? "-: expects at least 1 argument, given 0"))
(htdp-err/rt-test (/) (exn-type-and-msg exn:application:arity? "/: expects at least 1 argument, given 0"))
(htdp-err/rt-test (-) (exn-type-and-msg exn:application:arity? #rx"wrong number of arguments.*procedure: -\n.*expected[^:]*: at least 1.*given[^:]*: 0"))
(htdp-err/rt-test (/) (exn-type-and-msg exn:application:arity? #rx"wrong number of arguments.*procedure: /\n.*expected[^:]*: at least 1.*given[^:]*: 0"))
;(htdp-test 1 (/ 1) exn:application:arity?)
;; Check that `local' works with macros that expand to `begin':