dimanche 21 janvier 2018

C# Random Seed Value of int.MinValue Unpredictable

So I am currently trying to test a function that uses a random function. In order to test it, I'm passing in a seed value to the C# Random function. (ie. System.Random)

My test cases involve using int.MaxValue and int.MinValue to get boundary testing. The max value of integer produces consistent and expected results. But when I try to use the min value the next keeps producing random results that are not predictable and therefore can't be tested.

I'm curious if this is expected or what the reasoning a seed is not producing predictable results. Am I missing something?

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire