Files
WoofWare.Myriad/WoofWare.Myriad.Plugins.Test/TestRemoveOptions.fs
Patrick Stevens ed0e4da0a3 Bump deps (#54)
2023-12-30 12:50:53 +00:00

25 lines
518 B
Forth

namespace WoofWare.Myriad.Plugins.Test
open FsCheck
open ConsumePlugin
open NUnit.Framework
open FsUnitTyped
module TestRemoveOptions =
let shortenProperty (f : RecordType) =
let g = RecordType.shorten f
g.B |> shouldEqual f.B
g.C |> shouldEqual f.C
match f.A with
| None -> g.A |> shouldEqual (RecordType.DefaultA ())
| Some a -> g.A |> shouldEqual a
true
[<Test>]
let ``shorten works`` () =
Check.QuickThrowOnFailure shortenProperty