projects
/
scheme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix total pattern match verification
[scheme.git]
/
tests.scm
diff --git
a/tests.scm
b/tests.scm
index 4e6818578f8e37ee3e88205e4b47aff44b9130cb..7a9b3bffd34df74b48680816cf8e7ceb50b7adbc 100644
(file)
--- a/
tests.scm
+++ b/
tests.scm
@@
-311,6
+311,7
@@
(case (foo 42 12)
[(foo 20 x) 0]
[(foo 42 x) x]
(case (foo 42 12)
[(foo 20 x) 0]
[(foo 42 x) x]
+ [(foo y x) 0]
[(bar x) 0]))
12)
[(bar x) 0]))
12)
@@
-334,12
+335,13
@@
[bar 12]))
12)
; todo: make this error for incomplete pattern match
[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]
(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])
))))