Fix contract test form for the failure case

This hadn't been updated for recent contract changes but
hadn't been noticed since it only breaks on failing tests.
This commit is contained in:
Asumu Takikawa 2015-03-16 22:26:40 -04:00
parent 8288aaa160
commit 1e44bee956

View File

@ -51,7 +51,9 @@
(let/ec exit
(let ([contract (type->contract v (λ (#:reason [reason #f])
(exit (or reason "No reason given"))))])
(with-check-info (('contract (syntax->datum contract)))
(match-define (list ctc-defs ctc) contract)
(define ctc-data (map syntax->datum (append ctc-defs (list ctc))))
(with-check-info (('contract ctc-data))
(fail-check "type could be converted to contract")))))
(unless (regexp-match? expected-reason reason)
(with-check-info (('reason reason))