我试图用所享有与NUnit的为测试运行.测试用例取自" 入门",并在NUnit外部运行时按预期工作:
namespace FsTest.Tests
open NUnit.Framework
open Swensen.Unquote
[<TestFixture>]
module Example =
[<Test>]
let foo() =
test <@ (1+2)/3 = 1 @>
Run Code Online (Sandbox Code Playgroud)
在NUnit下我得到这个例外:
FsTest.Tests.Example.foo:System.MissingMethodException:找不到方法:'System.Tuple
2<Microsoft.FSharp.Collections.FSharpList1,Microsoft.FSharp.Quotations.FSharpExpr> Internal.reduceFullyAndGetLast(Microsoft.FSharp.Quotations.FSharpExpr)'.
我想知道上面的代码是否有任何问题以及如何使其工作.raise如果有帮助的话,Unquote 对我来说也是失败的.