mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Test multiple patterns per branch
This commit is contained in:
parent
1503ec4751
commit
a51ae4d980
1 changed files with 12 additions and 0 deletions
|
@ -43,6 +43,18 @@ mod specialize_when {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multiple_patterns_per_branch() {
|
||||
expect_mono_expr_str(
|
||||
r"
|
||||
when 123 is
|
||||
123 | 321 -> 321
|
||||
_ -> 0
|
||||
",
|
||||
"When(Number(I16(123)), Number(I16(123)) | Number(I16(321)) -> Number(I16(321)), Underscore -> Number(I16(0)))"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn guard() {
|
||||
expect_mono_expr_str(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue