mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-12 15:38:42 +00:00
Use our DSLs a bit more (#154)
This commit is contained in:
@@ -193,12 +193,13 @@ module TestJsonSerde =
|
||||
|
||||
let decompose = FSharpValue.PreComputeUnionTagReader typeof<FirstDu>
|
||||
|
||||
Gen.listOf duGen
|
||||
|> Gen.eval 100 (StdGen.StdGen (rand.Next (), rand.Next ()))
|
||||
|> List.iter (fun du ->
|
||||
let mutable i = 0
|
||||
|
||||
while i < 10_000 && Array.exists (fun i -> i = 0) counts do
|
||||
let du = Gen.eval 10 (StdGen.StdGen (rand.Next (), rand.Next ())) duGen
|
||||
let tag = decompose du
|
||||
counts.[tag] <- counts.[tag] + 1
|
||||
)
|
||||
i <- i + 1
|
||||
|
||||
for i in counts do
|
||||
i |> shouldBeGreaterThan 0
|
||||
|
Reference in New Issue
Block a user