Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用FsUnit.Xunit.
FsUnit.Xunit
open FsUnit.Xunit [<Fact>] let ``simple test`` () = let xs = [ 1; 2; 3 ] xs |> should contain 1 xs |> should not contain 99 // Not real code
我也尝试过使用not'.
not'
我该怎么写这个?
您只需将其括在括号中,因为它需要一个约束(而不是函数)。contain是一个期望一个值并返回一个约束的函数。
contain
xs |> should not' (contain 99)