【发布时间】:2012-04-09 17:54:00
【问题描述】:
我正在尝试检查我的函数是否返回 Some(x)
testedFunc() |> should be (sameAs Some)
testedFunc() |> should be Some
testedFunc() |> should equal Some
一切都不起作用。我宁愿不使用:
match testedFunc() with
| Some -> Pass()
| None -> Fail()
有人知道怎么做吗?
【问题讨论】:
-
要使用 Unquote (code.google.com/p/unquote) 进行比较,请参阅 gist.github.com/2366849