leanovate / gopter

GOlang Property TestER
MIT License
599 stars 40 forks source link

gen.Struct produces non-deterministic value #44

Closed au-phiware closed 6 years ago

au-phiware commented 6 years ago

It's important that generators produce the same value for the same GenParameters (same seed, etc.) The enumeration of Go maps is non-deterministic, in fact the Go designers have gone out of their way to make it random! This means that the values produced by the Gens in the map passed to gen.Struct are most likely to be different from one call to the next given the same PRNG.