f#-unquote

Unquote: What am I missing?

社会主义新天地 提交于 2019-12-10 22:38:22
问题 I'm trying to get the Unquote library working with xUnit in .NET 4, and I'm not having any luck at all getting the tests to run. So, I broke it down to the simplest reproduction steps I could. Does anybody know what I might be missing? Create a new F# Library project. Use NuGet to add xUnit and Unquote references. Paste in the following code... I got the actual test directly from the Unquote home page, but the content doesn't matter, because it doesn't get run. module Tests open Xunit open

MissingMethodException when using Unquote asserts

人盡茶涼 提交于 2019-12-01 06:23:26
I'm trying to use unquote with NUnit as the test runner. The test case is taken from Getting Started and works as expected when run outside of NUnit: namespace FsTest.Tests open NUnit.Framework open Swensen.Unquote [<TestFixture>] module Example = [<Test>] let foo() = test <@ (1+2)/3 = 1 @> Under NUnit I get this exception: FsTest.Tests.Example.foo: System.MissingMethodException : Method not found: 'System.Tuple 2<Microsoft.FSharp.Collections.FSharpList 1,Microsoft.FSharp.Quotations.FSharpExpr> Internal.reduceFullyAndGetLast(Microsoft.FSharp.Quotations.FSharpExpr)'. I'd like to know if there's

MissingMethodException when using Unquote asserts

夙愿已清 提交于 2019-12-01 04:08:26
问题 I'm trying to use unquote with NUnit as the test runner. The test case is taken from Getting Started and works as expected when run outside of NUnit: namespace FsTest.Tests open NUnit.Framework open Swensen.Unquote [<TestFixture>] module Example = [<Test>] let foo() = test <@ (1+2)/3 = 1 @> Under NUnit I get this exception: FsTest.Tests.Example.foo: System.MissingMethodException : Method not found: 'System.Tuple 2<Microsoft.FSharp.Collections.FSharpList 1,Microsoft.FSharp.Quotations

What unit testing frameworks are available for F#

浪子不回头ぞ 提交于 2019-11-27 04:16:24
I am looking specifically for frameworks that allow me to take advantage of unique features of the language. I am aware of FsUnit . Would you recommend something else, and why? My own unit testing library, Unquote , takes advantage of F# quotations to allow you to write test assertions as plain, statically checked F# boolean expressions and automatically produces nice step-by-step test failure messages. For example, the following failing xUnit test [<Fact>] let ``demo Unquote xUnit support`` () = test <@ ([3; 2; 1; 0] |> List.map ((+) 1)) = [1 + 3..1 + 0] @> produces the following failure

What unit testing frameworks are available for F#

笑着哭i 提交于 2019-11-26 12:43:44
问题 I am looking specifically for frameworks that allow me to take advantage of unique features of the language. I am aware of FsUnit. Would you recommend something else, and why? 回答1: My own unit testing library, Unquote, takes advantage of F# quotations to allow you to write test assertions as plain, statically checked F# boolean expressions and automatically produces nice step-by-step test failure messages. For example, the following failing xUnit test [<Fact>] let ``demo Unquote xUnit support