Closed DK96-OS closed 2 years ago
Remaining Goals for PR:
IntRangeElement
The remaining coverage on IntRangeElement
requires validating the behavior of the generate
method in cases where the number of possible outputs is very large.
Assuming we are using a true random number source, a large number of values may need to be generated before the values at the ends of the valid range are observed.
This is where the IntCounter127
and the IntCounterTree
are important.
IntCounter127
is better than using a boolean, because statistics operations can be applied at the end of the test.
IntCounterTree
is helpful for combining multiple IntRangeCounter
instances, as these counters have a limit on the size of their internal arrays.
Alternatively, a pseudorandom generator (or mock) could be injected by the test environment, and this could provide the values that are needed to validate IntRangeElement
behavior.
IntRangeElement
range of 16 values parameterized test case:
It is interesting to note that the StandardDeviation of the counts of generated values seemed to be larger when the range was either near the Integer.MIN or Integer.MAX
For value ranges (0, 15) and (-16, -1) the StandardDeviation was about or less than 11. But for both MIN and MAX cases, the StandardDeviation was about 13 or 7.
This does not look good for randomness utilities if these results can be repeated.
The recent test failure in IntRangeElementGeneratedValuesTest
was caused by random fluctuations. The standard deviation of count values was lower than expected, which shows that the generated values were more uniformly distributed than during other runs.
After rerunning tests, it appears there is no discernible pattern, and no dependence on where the range of generated values are located on the Integer domain.
What is not being tested currently, is whether any particular value in any of these target ranges has some distinguishable behavior relative to the other values.
Create Integer Range Generators.
Create Integer counters for evaluating the output of generators.