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