Closed bennn closed 6 years ago
check-exn
exn
exn-message
check-not-exn
exception
exception-message
I think both should use exception and exception-message
Example: here's 2 failing checks:
#lang racket/base (require rackunit) (define (die) (raise-user-error 'die)) (check-exn exn:fail:contract? die) (check-not-exn die)
And their output:
raco test: "foo.rkt" -------------------- FAILURE name: check-exn location: foo.rkt:6:0 params: '(#<procedure:exn:fail:contract?> #<procedure:die>) message: "Wrong exception raised" exn-message: "error: die" exn: #(struct:exn:fail:user "error: die" #<continuation-mark-set>) -------------------- -------------------- FAILURE name: check-not-exn location: foo.rkt:7:0 params: '(#<procedure:die>) message: "Exception raised" exception-message: "error: die" exception: #(struct:exn:fail:user "error: die" #<continuation-mark-set>) -------------------- 2/2 test failures
check-exn
uses the namesexn
andexn-message
check-not-exn
uses the namesexception
andexception-message
I think both should use
exception
andexception-message
Example: here's 2 failing checks:
And their output: