mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Add back working tests
This commit is contained in:
parent
4f32f43048
commit
ecb8b12167
1 changed files with 67 additions and 0 deletions
|
@ -5442,6 +5442,73 @@ mod test_fmt {
|
|||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_parens_body() {
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(
|
||||
b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
));
|
||||
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
),
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(
|
||||
b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
),
|
||||
);
|
||||
|
||||
expr_formats_to(
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0)
|
||||
"
|
||||
),
|
||||
indoc!(
|
||||
r"
|
||||
Task.fromResult
|
||||
(
|
||||
b <- binaryOp ctx
|
||||
if a == b then
|
||||
-1
|
||||
else
|
||||
0
|
||||
)
|
||||
"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backpassing_body_on_newline() {
|
||||
expr_formats_same(indoc!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue