mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
move pattern desugar tests to test_mono
This commit is contained in:
parent
d924125e6d
commit
0ccc71389a
5 changed files with 79 additions and 48 deletions
|
@ -893,6 +893,37 @@ fn optional_when() {
|
|||
"#
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn optional_field_with_binary_op() {
|
||||
r#"
|
||||
{ bar ? 1 + 1 } = {}
|
||||
bar
|
||||
"#
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn nested_optional_field_with_binary_op() {
|
||||
r#"
|
||||
when { x: ([{}], "foo") } is
|
||||
{ x: ([{ bar ? 1 + 1 }], _) } -> bar
|
||||
_ -> 0
|
||||
"#
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn multiline_record_pattern() {
|
||||
r#"
|
||||
x = { a: 1, b: 2, c: 3 }
|
||||
{
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
} = x
|
||||
|
||||
a + b + c
|
||||
"#
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn nested_pattern_match() {
|
||||
r#"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue