X-Git-Url: https://git.lukelau.me/?p=scheme.git;a=blobdiff_plain;f=tests.scm;h=f327231339d86e9b0c602f188605b072d57c0cfa;hp=0c11e89714b89d309cae775cc7f47d3d800e752f;hb=54729d061d7cbf50de62d767327fcfc3bea1952f;hpb=061f7cd9efa96f5d4e7206ec89931f9fd8421a6c diff --git a/tests.scm b/tests.scm index 0c11e89..f327231 100644 --- a/tests.scm +++ b/tests.scm @@ -300,3 +300,16 @@ [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) + +(test-prog '((data Foo [foo Int]) + (data Bar [bar Foo]) + (case (bar (foo 42)) + [(bar (foo x)) x])) + 42) +