add stlc fail tests
This commit is contained in:
parent
b4bc922dda
commit
f7635af9b5
|
@ -1,4 +1,12 @@
|
|||
#lang s-exp "../stlc.rkt"
|
||||
(require "rackunit-typechecking.rkt")
|
||||
|
||||
;; cannot write any terms without base types
|
||||
;; cannot write any terms without base types, but can check some errors
|
||||
|
||||
(typecheck-fail (λ ([x : Undef]) x) #:with-msg "Undef: unbound identifier")
|
||||
(typecheck-fail (λ ([x : →]) x)
|
||||
#:with-msg "Improper usage of type constructor →.+expected >= 1 arguments")
|
||||
(typecheck-fail (λ ([x : (→)]) x)
|
||||
#:with-msg "Improper usage of type constructor →.+expected >= 1 arguments")
|
||||
(typecheck-fail (λ ([x : (→ →)]) x)
|
||||
#:with-msg "Improper usage of type constructor →.+expected >= 1 arguments")
|
Loading…
Reference in New Issue
Block a user