add sysf tests

This commit is contained in:
Stephen Chang 2014-08-15 15:32:54 -04:00
parent 820d56cf2a
commit 1a327fc8f9

9
sysf-tests.rkt Normal file
View File

@ -0,0 +1,9 @@
#lang s-exp "sysf.rkt"
;; polymorphic tests
(define-type (Maybe X) (variant (None) (Just X)))
(check-type (None {Int}) : (Maybe Int))
(check-type (Just {Int} 1) : (Maybe Int))
(check-type-error (Just {Int} #f))
(check-not-type (Just {Int} 1) : (Maybe Bool))
(check-type (λ {X} ([x : X]) x) : ( (X) ( X X)))