Closed Porges closed 3 years ago
Looks like a typical "works for me" situation ;) Seriously though: I checked the travis-build, which was ok and just now added an additional github action (https://github.com/leanovate/gopter/actions) and they are working as well.
Not sure what the cause of this might be. Maybe it is the go version you are using or maybe your build-cache is messed up?
@untoldwind this is a fresh checkout with 1.15, at commit 9ec843d8. I’m on Windows, I don’t know if that (weirdly) could be part of the problem?
Actually TestOneConstOf and TestOneGenOf seem to be probabilistic and won’t always pass (due to commonOneOfTest
).
(as to why the distribution of values generated in commonOneOfTest
is so terrible, I don’t have an answer…)
It's been a very long time since I developed on windows, so I had to setup a VM and indeed there are some tests that fail there that are working perfectly fine on linux.
It looks like the random number generator (math/rand
) behaves differently on both systems, which is quiet surprising ...
I need some time to get to the bottom of this ;)
Looks like the problem was more related to seeding rather than the rng. I fixed the tweaked the tests to use fixed seed. Please check if there are now working on your system as well.
@untoldwind Looks good, thanks!
For example: