Skip to content

Commit 2dd849f

Browse files
committed
Fix new exception type MatchException -> EqualException.ForMismatchedValues, thanks XUnit for making incompatible changes without first deprecating types
See fsprojects/FsUnit#240 for the FsUnit change (2nd commit) and fsprojects/FsUnit#251, and https://xunit.net/releases/v2/2.5.0
1 parent b15f6b3 commit 2dd849f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/FSharp.Control.TaskSeq.Test/Nunit.Extensions.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module ExtraCustomMatchers =
2222
let private baseResultTypeTest value =
2323
match value with
2424
| null ->
25-
MatchException("Result type", "<null>", "Value <null> or None is never Result.Ok or Result.Error")
25+
EqualException.ForMismatchedValues("Result type", "<null>", "Value <null> or None is never Result.Ok or Result.Error")
2626
|> raise
2727

2828
| _ ->
@@ -31,7 +31,7 @@ module ExtraCustomMatchers =
3131
if ty.FullName.StartsWith "Microsoft.FSharp.Core.FSharpResult" then
3232
FSharpValue.GetUnionFields(value, ty) |> fst
3333
else
34-
MatchException("Result type", ty.Name, "Type must be Result<_, _>")
34+
EqualException.ForMismatchedValues("Result type", ty.Name, "Type must be Result<_, _>")
3535
|> raise
3636

3737
let private baseOptionTypeTest value =
@@ -49,9 +49,9 @@ module ExtraCustomMatchers =
4949
| "None" -> None
5050
| _ ->
5151
raise
52-
<| MatchException("Option type", ty.Name, "Unexpected field name for F# option type")
52+
<| EqualException.ForMismatchedValues("Option type", ty.Name, "Unexpected field name for F# option type")
5353
else
54-
MatchException("Option type", ty.Name, "Type must be Option<_>")
54+
EqualException.ForMismatchedValues("Option type", ty.Name, "Type must be Option<_>")
5555
|> raise
5656

5757

0 commit comments

Comments
 (0)