From 681d0df574b2f75444e390f0de2ef400b55d2fae Mon Sep 17 00:00:00 2001 From: "humberto-javier.cortes-benavides" Date: Wed, 20 Jan 2021 18:17:02 +0100 Subject: [PATCH] #1238 Unit Tests to test MultilineBlockBracketsOnSameColumn = true are changed --- src/Fantomas.Tests/ControlStructureTests.fs | 34 +-------------- ...ineBlockBracketsOnSameColumnRecordTests.fs | 42 ++++++++++++++++--- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/Fantomas.Tests/ControlStructureTests.fs b/src/Fantomas.Tests/ControlStructureTests.fs index 75bd694504..21d89f57f9 100644 --- a/src/Fantomas.Tests/ControlStructureTests.fs +++ b/src/Fantomas.Tests/ControlStructureTests.fs @@ -835,36 +835,4 @@ try with ex -> Infrastructure.ReportWarning ex return None -""" - -[] -let ``MultilineBlockBracketsOnSameColumn should be honored inside match block, 1238`` () = - formatSourceString - false - """ - module Foo = - let Bar () = - if x then - match foo with - | { Bar = true - Baz = _ } -> failwith "xxx" - | _ -> None -""" - { config with - MaxLineLength = 30 - MultilineBlockBracketsOnSameColumn = true } - |> prepend newline - |> should - equal - """ -module Foo = - let Bar () = - if x then - match foo with - | { - Bar = true - Baz = _ - } - -> failwith "xxx" - | _ -> None -""" +""" \ No newline at end of file diff --git a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs index 90d10bc907..4427b78f9c 100644 --- a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs +++ b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs @@ -560,11 +560,12 @@ let ``SynPat.Record in pattern match with bracketOnSeparateLine`` () = equal """ match foo with -| { Bar = bar - Level = 12 - Vibes = plenty - Lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " } -> - "7" +| { + Bar = bar + Level = 12 + Vibes = plenty + Lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " + } -> "7" | _ -> "8" """ @@ -955,3 +956,34 @@ type TestType = // Some more comments private { Meh : TimeSpan } """ + +[] +let ``MultilineBlockBracketsOnSameColumn should be honored inside match block, 1238`` () = + formatSourceString + false + """ + module Foo = + let Bar () = + if x then + match foo with + | { Bar = true + Baz = _ } -> failwith "xxx" + | _ -> None +""" + { config with + MaxLineLength = 30 } + |> prepend newline + |> should + equal + """ +module Foo = + let Bar () = + if x then + match foo with + | { + Bar = true + Baz = _ + } -> + failwith "xxx" + | _ -> None +""" \ No newline at end of file