Add more init-env tests

This commit is contained in:
Asumu Takikawa 2016-06-21 15:10:33 -04:00
parent c5ec933bb8
commit 5f311d00c7

View File

@ -2,6 +2,7 @@
(require "test-utils.rkt"
rackunit
(rep object-rep type-rep)
(env init-envs)
(types abbrev union))
@ -27,5 +28,25 @@
(check-equal?
(convert (-mu x (-lst* Univ (-box x))))
'(make-Mu 'x (make-Pair Univ (make-Pair (make-Box (make-F 'x)) -Null))))
(check-equal?
(convert (make-StructTypeTop))
'-StructTypeTop)
(check-equal?
(convert (make-BoxTop))
'-BoxTop)
(check-equal?
(convert (make-ClassTop))
'-ClassTop)
(check-equal?
(convert (make-FieldPE))
'-field)
(check-equal?
(convert (make-StructType (make-Struct #'foo #f null #f #f #'foo?)))
'(make-StructType
(make-Struct (quote-syntax foo) #f (list) #f #f (quote-syntax foo?))))
(check-equal?
(convert (make-StructTop (make-Struct #'foo #f null #f #f #'foo?)))
'(make-StructTop
(make-Struct (quote-syntax foo) #f (list) #f #f (quote-syntax foo?))))
)
))