test-none.rkt (362B)
1 #lang typed/racket 2 3 (require typed-struct-props 4 typed/rackunit) 5 6 (struct/props foo ([f : Number]) #:transparent) 7 8 (test-not-exn "The structure's constructor and type work properly" 9 (λ () (ann (foo 12) foo))) 10 11 (test-equal? "The structure's constructor and accessor work properly" 12 (ann (foo-f (foo 12)) Number) 13 12)