Closed rschwietzke closed 4 years ago
implementation and documentation done, can be tested
IMO the changes are good, I have nothing to complain about, except for one typo
nextInt(int n)
returns 0 on n=0
. The normal logic is to throw an Exception. Since our behaviour differs from the standard implementation, we should put this in the Javadoc of the method.nextInt
handles "0" specifically while getRandom(final int[])
throws an Exception when there is no data or an empty array. It feels inconsistent to throw an error here but not in the former method. Do note, that this is really not that bad and only feels a little weird.@ckeiner Can be rechecked.
Our implementation of nextInt(int n) returns 0 on n=0. The normal logic is to throw an Exception. Since our behaviour differs from the standard implementation, we should put this in the Javadoc of the method.
done
nextInt handles "0" specifically while getRandom(final int[]) throws an Exception when there is no data or an empty array. It feels inconsistent to throw an error here but not in the former method. Do note, that this is really not that bad and only feels a little weird.
won't fix. getRandom([0,0,0]) would work, but getRandom([]) doesn't give any hint which result set is expected
Alright.
It is often important to randomize things but still being able to replay the sequence later or fix up the randomness. Add support for that to Neo and ensure that order and behavior of test cases before does not influence the outcome.