我有以下代码,但测试失败:
open Xunit
open FsUnit.Xunit
let rec openOrSenior xs =
match xs with
| head :: tail when fst head >= 55 && snd head >= 7 -> "Senior" :: openOrSenior tail
| head :: tail -> "Open" :: openOrSenior tail
| [] -> []
[<Fact>]
let ``empty input gives empty result``() =
openOrSenior [] |> should equal List.empty
测试失败,出现以下匹配错误
FsUnit.Xunit+MatchException:抛出了“FsUnit.Xunit+MatchException”类型的异常。预期:等于 []
实际:是 []