mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-05 03:58:40 +00:00
25 lines
518 B
Forth
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
|