commit f7635af9b59d846e10f58102059acf41a328e58b parent b4bc922ddae7ee998d19b103194a28453fe28843 Author: Stephen Chang <stchang@ccs.neu.edu> Date: Thu, 22 Oct 2015 13:22:35 -0400 add stlc fail tests Diffstat:
| M | tapl/tests/stlc-tests.rkt | | | 12 | ++++++++++-- |
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tapl/tests/stlc-tests.rkt b/tapl/tests/stlc-tests.rkt @@ -1,4 +1,12 @@ #lang s-exp "../stlc.rkt" (require "rackunit-typechecking.rkt") -;; cannot write any terms without base types -\ No newline at end of file +;; 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") +\ No newline at end of file