Skip to content

Commit

Permalink
Add test for non-string map key format on .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Christer van der Meeren committed Mar 22, 2024
1 parent 2cbb43b commit c5706fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/Faqt.Tests/Formatting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,19 @@ Value:
"""


[<Fact>]
let ``Map format with non-string keys`` () =
fun () -> ().Should().FailWith("Value", Map.ofList [ 1, "a"; 2, "b" ])
|> assertExnMsg
"""
Subject: ()
Should: FailWith
Value:
'1': a
'2': b
"""


module YamlFormatterBuilder =


Expand Down
1 change: 0 additions & 1 deletion src/Faqt/Formatting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ type YamlFormatterBuilder = private {
.WithUnionUnwrapSingleFieldCases()
.WithUnwrapOption(false)
#if NET8_0_OR_GREATER
// TODO: Test when upgrading test project to .NET 8
.WithMapFormat(MapFormat.Object)
#endif
)
Expand Down

0 comments on commit c5706fe

Please sign in to comment.