public void Test40MillionPerkyIterations() { var genA = new PerkyGeneratorDecorator(new Generator(InputGenA, GenAMultiplier), 4); var genB = new PerkyGeneratorDecorator(new Generator(InputGenB, GenBMultiplier), 8); var count = CountMatchesOverIteration(genA, genB, PerkyIterations); Console.WriteLine($"Generator results matched {count} times"); }
public void TestExamplePerkyGenerator() { var generator = new PerkyGeneratorDecorator(new Generator(ExampleGenA, GenAMultiplier), 4); Assert.AreEqual(1352636452, generator.NextValue()); Assert.AreEqual(1992081072, generator.NextValue()); Assert.AreEqual(530830436, generator.NextValue()); Assert.AreEqual(1980017072, generator.NextValue()); Assert.AreEqual(740335192, generator.NextValue()); generator = new PerkyGeneratorDecorator(new Generator(ExampleGenB, GenBMultiplier), 8); Assert.AreEqual(1233683848, generator.NextValue()); Assert.AreEqual(862516352, generator.NextValue()); Assert.AreEqual(1159784568, generator.NextValue()); Assert.AreEqual(1616057672, generator.NextValue()); Assert.AreEqual(412269392, generator.NextValue()); }