当我使用 NUnit 2.6.3 运行这个 FsUnit 测试时,
let f xs = Some (List.map ((+) 2) xs)
[<Test>]
let test() =
f []
|> should equal (Some [])
我得到:
Result Message:
Expected: <Some([])>
But was: <Some([])>
Result StackTrace:
at FsUnit.TopLevelOperators.should[a,a](FSharpFunc`2 f, a x, Object y)
即使消息中的 Expected 和 Actual 相同,测试也会失败。发生了什么?