From f4b0d5c1b14a1890e1b88398e256b272595346b2 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Fri, 16 Aug 2019 01:19:00 +0100 Subject: [PATCH] Add extra spicy test case --- tests.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests.scm b/tests.scm index f327231..d2711d7 100644 --- a/tests.scm +++ b/tests.scm @@ -312,4 +312,14 @@ (case (bar (foo 42)) [(bar (foo x)) x])) 42) + ; todo: make this error for incomplete pattern match +(test-prog '((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]))) + 12) -- 2.30.2