public void TestInt() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (int aIntTest in IntTest) { int g = rnd.NextInt(); Assert.AreEqual(g, aIntTest, AIFH.DefaultPrecision); } }
public void TestIntRange() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (int aIntRangeTest in IntRangeTest) { int g = rnd.NextInt(0, 10); Assert.AreEqual(g, aIntRangeTest); } }
public void TestGaussianFloat() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (double aGaussianTest in GaussianTest) { double g = rnd.NextGaussian(); Assert.AreEqual(g, aGaussianTest, AIFH.DefaultPrecision); } }
public void TestFloat() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (float aFloatTest in FloatTest) { var l = (float) rnd.NextFloat(); Assert.AreEqual(l, aFloatTest, AIFH.DefaultPrecision); } }
public void TestLong() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (long aLongTest in LongTest) { long l = rnd.NextLong(); Assert.AreEqual(l, aLongTest); } }
public void TestDouble() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (double aDoubleTest in DoubleTest) { double g = rnd.NextDouble(); Assert.AreEqual(g, aDoubleTest, AIFH.DefaultPrecision); } }
public void TestGenerateBoolean() { var rnd = new MultiplyWithCarryGenerateRandom(1); foreach (bool aBooleanTest in BooleanTest) { bool g = rnd.NextBoolean(); Assert.AreEqual(g, aBooleanTest); } }