X-Git-Url: https://git.lukelau.me/?p=scheme.git;a=blobdiff_plain;f=tests.scm;h=7a9b3bffd34df74b48680816cf8e7ceb50b7adbc;hp=4e6818578f8e37ee3e88205e4b47aff44b9130cb;hb=6b91111c8d3fd8e617bece8d69f6c98d5e6ef3cb;hpb=639c992ea2c89ef0b6421279a76e637c7f469517 diff --git a/tests.scm b/tests.scm index 4e68185..7a9b3bf 100644 --- a/tests.scm +++ b/tests.scm @@ -311,6 +311,7 @@ (case (foo 42 12) [(foo 20 x) 0] [(foo 42 x) x] + [(foo y x) 0] [(bar x) 0])) 12) @@ -334,12 +335,13 @@ [bar 12])) 12) ; todo: make this error for incomplete pattern match -(test-exception '((data A [foo Int] [bar Int B]) +(test-exception + (codegen '((data A [foo Int] [bar Int B]) (data B [baz Int]) (let ([val (bar 42 (baz 12))]) (case val [(foo 42) 0] [(bar 32 (baz 12)) 1] [(bar 42 (baz x)) x] - [(foo x) 2])))) + [(foo x) 2])))))