Commented in many tests which apparently did not work in the past

This commit is contained in:
Chadtech 2021-10-16 13:44:14 -04:00
parent 2ca9dad156
commit 56c36c51d7

View file

@ -387,32 +387,32 @@ mod test_fmt {
);
}
// #[test]
// fn defs_with_defs() {
// expr_formats_to(
// indoc!(
// r#"
// x =
// y = 4
// z = 8
// w
#[test]
fn defs_with_defs() {
expr_formats_to(
indoc!(
r#"
x =
y = 4
z = 8
w
// x
// "#
// ),
// indoc!(
// r#"
// x =
// y = 4
// z = 8
x
"#
),
indoc!(
r#"
x =
y = 4
z = 8
// w
w
// x
// "#
// ),
// );
// }
x
"#
),
);
}
#[test]
fn comment_between_two_defs() {
@ -573,15 +573,16 @@ mod test_fmt {
));
}
// #[test]
// fn record_field_destructuring() {
// expr_formats_same(indoc!(
// r#"
// when foo is
// { x: 5 } -> 42
// "#
// ));
// }
#[test]
fn record_field_destructuring() {
expr_formats_same(indoc!(
r#"
when foo is
{ x: 5 } ->
42
"#
));
}
#[test]
fn record_updating() {
@ -942,24 +943,43 @@ mod test_fmt {
"#
));
// expr_formats_to(
// indoc!(
// r#"
// identity = \a
// -> a
expr_formats_to(
indoc!(
r#"
identity = \a
-> a
// identity 41
// "#
// ),
// indoc!(
// r#"
// identity = \a ->
// a
identity 41
"#
),
indoc!(
r#"
identity = \a -> a
// identity 41
// "#
// ),
// );
identity 41
"#
),
);
expr_formats_to(
indoc!(
r#"
identity = \a
->
a + b
identity 4010
"#
),
indoc!(
r#"
identity = \a ->
a + b
identity 4010
"#
),
);
expr_formats_same(indoc!(
r#"
@ -981,7 +1001,7 @@ mod test_fmt {
// identity 43
// "#
// ));
//
expr_formats_same(indoc!(
r#"
identity = \a,
@ -1237,17 +1257,17 @@ mod test_fmt {
}
#[test]
fn multi_line_list_def() {
// expr_formats_same(indoc!(
// r#"
// l =
// [
// 1,
// 2
// ]
expr_formats_same(indoc!(
r#"
l =
[
1,
2,
]
// l
// "#
// ));
l
"#
));
expr_formats_to(
indoc!(
@ -1273,32 +1293,32 @@ mod test_fmt {
),
);
// expr_formats_to(
// indoc!(
// r#"
// results =
// # Let's count past 6
// [
// Ok 6,
// Err CountError
// ]
expr_formats_to(
indoc!(
r#"
results =
# Let's count past 6
[
Ok 6,
Err CountError
]
// allOks results
// "#
// ),
// indoc!(
// r#"
// results =
// # Let's count past 6
// [
// Ok 6,
// Err CountError
// ]
allOks results
"#
),
indoc!(
r#"
results =
# Let's count past 6
[
Ok 6,
Err CountError,
]
// allOks results
// "#
// ),
// );
allOks results
"#
),
);
}
// RECORD LITERALS
@ -1355,18 +1375,18 @@ mod test_fmt {
#[test]
fn multi_line_record_def() {
// expr_formats_same(indoc!(
// r#"
// pos =
// {
// x: 4,
// y: 11,
// z: 16
// }
expr_formats_same(indoc!(
r#"
pos =
{
x: 4,
y: 11,
z: 16,
}
// pos
// "#
// ));
pos
"#
));
expr_formats_to(
indoc!(