add regression test for (Sequenceof T)
Test to make sure `(Sequenceof (Boxof T))` wraps sequence elements in a contract
This commit is contained in:
parent
f35a6fd5cb
commit
9fe2252eef
|
@ -13,7 +13,15 @@
|
|||
(require (submod ".." typed))
|
||||
(define (bar) (foo 0)))
|
||||
|
||||
(module contract-test typed/racket/base
|
||||
(define b* : (Sequenceof (Boxof Integer)) (list (box 0)))
|
||||
(provide b*))
|
||||
|
||||
(require 'typed
|
||||
'other-typed)
|
||||
(foo 0)
|
||||
(bar)
|
||||
'other-typed
|
||||
'contract-test
|
||||
rackunit)
|
||||
(check-equal? (foo 0) "I got an integer: 0")
|
||||
(check-equal? (bar) "I got an integer: 0")
|
||||
(check-exn exn:fail:contract?
|
||||
(λ () (set-box! (car b*) 'NaN)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user