Add another instance of MyList (#100)

This commit is contained in:
Patrick Stevens
2024-02-18 14:13:34 +00:00
committed by GitHub
parent 1bbbf4bd06
commit 3209372b5b
5 changed files with 86 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
namespace WoofWare.Myriad.Plugins.Test
open NUnit.Framework
open FsCheck
open FsUnitTyped
open ConsumePlugin
[<TestFixture>]
module TestMyList2 =
let idCata : MyList2Cata<_> =
{
MyList2 =
{ new MyList2CataCase<_> with
member _.Nil = MyList2.Nil
member _.Cons head tail = MyList2.Cons (head, tail)
}
}
[<Test>]
let ``Cata works`` () =
let property (x : MyList2) = MyList2Cata.runMyList2 idCata x = x
Check.QuickThrowOnFailure property

View File

@@ -26,6 +26,7 @@
<Compile Include="TestCataGenerator\TestDirectory.fs" />
<Compile Include="TestCataGenerator\TestGift.fs" />
<Compile Include="TestCataGenerator\TestMyList.fs" />
<Compile Include="TestCataGenerator\TestMyList2.fs" />
<Compile Include="TestRemoveOptions.fs"/>
<Compile Include="TestSurface.fs"/>
<None Include="../.github/workflows/dotnet.yaml" />