From 56c36c51d75da83c39f76e9d1f8352a82aba387e Mon Sep 17 00:00:00 2001 From: Chadtech Date: Sat, 16 Oct 2021 13:44:14 -0400 Subject: [PATCH] Commented in many tests which apparently did not work in the past --- compiler/fmt/tests/test_fmt.rs | 230 ++++++++++++++++++--------------- 1 file changed, 125 insertions(+), 105 deletions(-) diff --git a/compiler/fmt/tests/test_fmt.rs b/compiler/fmt/tests/test_fmt.rs index 10dbb6b90a..73a044c090 100644 --- a/compiler/fmt/tests/test_fmt.rs +++ b/compiler/fmt/tests/test_fmt.rs @@ -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#" @@ -969,19 +989,19 @@ mod test_fmt { "# )); - // expr_formats_same(indoc!( - // r#" - // identity = - // \{ - // x, - // y - // } - // -> a - // - // identity 43 - // "# - // )); + // expr_formats_same(indoc!( + // r#" + // identity = + // \{ + // x, + // y + // } + // -> a // + // 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!(