fix misc tests for error-message change

This commit is contained in:
Matthew Flatt 2012-05-26 08:18:19 -06:00
parent 413c940fe6
commit b5ab6cec7e
5 changed files with 9 additions and 9 deletions

View File

@ -28,8 +28,8 @@
(define (list-tests) (define (list-tests)
(test (test
(! (car 0)) =error> "car: expects argument of type <pair>" (! (car 0)) =error> "car: contract violation\n expected: pair?"
(! (cdr 0)) =error> "cdr: expects argument of type <pair>" (! (cdr 0)) =error> "cdr: contract violation\n expected: pair?"
(! (car (cons 1 (/ 1 0)))) => 1 (! (car (cons 1 (/ 1 0)))) => 1
(! (cdr (cons (/ 1 0) 1))) => 1 (! (cdr (cons (/ 1 0) 1))) => 1
(! (list-ref (list (/ 1 0) 1 (/ 1 0)) 1)) => 1 (! (list-ref (list (/ 1 0) 1 (/ 1 0)) 1)) => 1
@ -40,7 +40,7 @@
(!! (member 1 (cons 0 (cons 1 2)))) => '(1 . 2) (!! (member 1 (cons 0 (cons 1 2)))) => '(1 . 2)
(!! (memq 1 (cons 0 (cons 1 2)))) => '(1 . 2) (!! (memq 1 (cons 0 (cons 1 2)))) => '(1 . 2)
(!! (memv 1 (cons 0 (cons 1 2)))) => '(1 . 2) (!! (memv 1 (cons 0 (cons 1 2)))) => '(1 . 2)
(! (second (map car (list 1 2 3)))) =error> "expects argument of type" (! (second (map car (list 1 2 3)))) =error> "contract violation"
(! (second (map car (list 1 '(2) 3)))) => 2 (! (second (map car (list 1 '(2) 3)))) => 2
)) ))

View File

@ -167,7 +167,7 @@
[p (delayer (channel-get ch) 99)]) [p (delayer (channel-get ch) 99)])
(thread (lambda () (channel-put ch 'x))) (thread (lambda () (channel-put ch 'x)))
(test (force p) => 99)) (test (force p) => 99))
(test (force (delayer (+ 1 "2"))) =error> "expects type"))) (test (force (delayer (+ 1 "2"))) =error> "contract violation")))
(t delay/sync) (t delay/sync)
(t delay/idle) (t delay/idle)
(let* ([ch (make-channel)] [p (delay/idle #:wait-for ch 99)]) (let* ([ch (make-channel)] [p (delay/idle #:wait-for ch 99)])

View File

@ -41,7 +41,7 @@
(test-mutator (build-path here "other-mutators" "top.rkt")) (test-mutator (build-path here "other-mutators" "top.rkt"))
=error> =error>
#rx"unbound identifier in module in: frozzle" #rx"unbound identifier in module\n in: frozzle"
(capture-output (test-mutator (build-path here "other-mutators" "printing.rkt"))) (capture-output (test-mutator (build-path here "other-mutators" "printing.rkt")))
=> =>

View File

@ -41,7 +41,7 @@
(test-mutator (build-path here "other-mutators" "top.rkt")) (test-mutator (build-path here "other-mutators" "top.rkt"))
=error> =error>
#rx"unbound identifier in module in: frozzle" #rx"unbound identifier in module\n in: frozzle"
(capture-output (test-mutator (build-path here "other-mutators" "printing.rkt"))) (capture-output (test-mutator (build-path here "other-mutators" "printing.rkt")))
=> =>

View File

@ -687,7 +687,7 @@ foo
--- ---
;; -------------------- errors ;; -------------------- errors
--- ---
( -@error-> "inp:1:0: read: expected a `)' to close `('" ; check -@error-> ( -@error-> "read: expected a `)' to close `('\n source:\n inp:1:0" ; check -@error->
--- ---
@foo{ -@error-> #rx":1:0: missing closing `}'$" @foo{ -@error-> #rx":1:0: missing closing `}'$"
--- ---
@ -707,10 +707,10 @@ foo
--- ---
\foo{\bar|-{} -\error-> #rx":1:5: missing closing `}-\\|'$" \foo{\bar|-{} -\error-> #rx":1:5: missing closing `}-\\|'$"
--- ---
@foo{@" -@error-> #rx":1:6: read: expected a closing '\"'$" @foo{@" -@error-> #rx"read: expected a closing '\"'\n source:\n #f:1:6$"
;; " <-- (balance this file) ;; " <-- (balance this file)
--- ---
\foo{\" -\error-> #rx":1:6: read: expected a closing '\"'$" \foo{\" -\error-> #rx"read: expected a closing '\"'\n source:\n inp:1:6$"
--- ---
@|1 2| @|1 2|
-@error-> -@error->