Fix bindings in ADT pattern matching codegen
[scheme.git] / tests.scm
index 7185032945aab633c43d3fcf0b0f1c24d55d0eb9..a3f4913a75d5e9177843da3d5a71ce2d24b0a8b4 100644 (file)
--- a/tests.scm
+++ b/tests.scm
 (test-prog '((data Foo [a] [b] [c])
             (let ([x b])
               (case x
-                [a b]
-                [b a]
-                [c x])))
+                [a 3]
+                [b 2]
+                [c 1])))
           2)
 
+(test-prog '((data Foo [foo Int Int] [bar Bool])
+            (case (foo 42 12)
+              [(foo 20 x) 0]
+              [(foo 42 x) x]
+              [(bar x) 0]))
+          12)
+