public void InitByArrayTest(int seedSize) { // the number of random numbers to test // This is chosen so that the state is cycled twice. const int size = 1400; var seeds = OriginalInitGenRand(1, seedSize); var generator = MersenneTwister32Bit19937.InitByArray(seeds); var actual = GetRandomValues(generator, size); var expected = OriginalInitByArray(seeds, size); Assert.AreEqual(expected, actual); }
public void InitByArrayNull() { Assert.Throws <ArgumentNullException>( () => MersenneTwister32Bit19937.InitByArray(null)); }