Exemplo n.º 1
0
        public void TestCompPrimeBins()
        {
            var limit      = 1000;
            var bucketSize = 12;
            var expected   = PrimeNumbers.OddPrimesUpTo(limit).ToList();
            var chunks     = PrimeNumbers.CompPrimeBins(limit, bucketSize);
            var actual     = chunks.SelectMany(c => c.Item1.Concat(c.Item2))
                             .OrderBy(i => i)
                             .ToList();

            CollectionAssert.AreEqual(expected, actual);
        }