move pattern desugar tests to test_mono

This commit is contained in:
Elias Mulhall 2023-11-26 20:14:32 -05:00
parent d924125e6d
commit 0ccc71389a
No known key found for this signature in database
GPG key ID: 8D1F3C219EAB45F2
5 changed files with 79 additions and 48 deletions

View file

@ -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#"