mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
cargo fmt
This commit is contained in:
parent
62dbe9fb53
commit
2738cd717d
1 changed files with 18 additions and 30 deletions
|
@ -6232,50 +6232,43 @@ mod test_fmt {
|
|||
|
||||
#[test]
|
||||
fn preserve_annotated_body() {
|
||||
expr_formats_same(
|
||||
indoc!(
|
||||
r"
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
x : i32
|
||||
x = 1
|
||||
x
|
||||
"
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserve_annotated_body_comment() {
|
||||
expr_formats_same(
|
||||
indoc!(
|
||||
r"
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
x : i32 # comment
|
||||
x = 1
|
||||
x
|
||||
"
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserve_annotated_body_comments() {
|
||||
expr_formats_same(
|
||||
indoc!(
|
||||
r"
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
x : i32
|
||||
# comment
|
||||
# comment 2
|
||||
x = 1
|
||||
x
|
||||
"
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserve_annotated_body_comments_with_newlines() {
|
||||
expr_formats_same(
|
||||
indoc!(
|
||||
r"
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
x : i32
|
||||
|
||||
# comment
|
||||
|
@ -6285,36 +6278,31 @@ mod test_fmt {
|
|||
x = 1
|
||||
x
|
||||
"
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserve_annotated_body_blank_comment() {
|
||||
expr_formats_same(
|
||||
indoc!(
|
||||
r"
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
x : i32
|
||||
#
|
||||
x = 1
|
||||
x
|
||||
"
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserve_annotated_body_with_newlines() {
|
||||
expr_formats_same(
|
||||
indoc!(
|
||||
r"
|
||||
expr_formats_same(indoc!(
|
||||
r"
|
||||
x : i32
|
||||
|
||||
x = 1
|
||||
x
|
||||
"
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
// this is a parse error atm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue