aboutsummaryrefslogtreecommitdiff
path: root/tests/stlc.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stlc.rkt')
-rw-r--r--tests/stlc.rkt8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/stlc.rkt b/tests/stlc.rkt
new file mode 100644
index 0000000..154e77d
--- /dev/null
+++ b/tests/stlc.rkt
@@ -0,0 +1,8 @@
+#lang racket
+(require (except-in rackunit check))
+(require "../stlc.rkt")
+
+(check-equal? (interpret '(λ x x)) '(λ x x #hash()))
+(check-equal? (interpret '((λ a a) (x y))) '(x y))
+(check-equal? (interpret '((λ a (x y)) (λ z z))) '(x y))
+(check-equal? (interpret '((λ a (a y)) x)) '(x y))