Пример #1
0
 public static void GapInPrimesTests_test1()
 {
     Assert.AreEqual(new long[] { 101, 103 }, GapInPrimes.Gap(2, 100, 110));
     Assert.AreEqual(new long[] { 103, 107 }, GapInPrimes.Gap(4, 100, 110));
     Assert.AreEqual(null, GapInPrimes.Gap(6, 100, 110));
     Assert.AreEqual(new long[] { 359, 367 }, GapInPrimes.Gap(8, 300, 400));
     Assert.AreEqual(new long[] { 337, 347 }, GapInPrimes.Gap(10, 300, 400));
 }
Пример #2
0
        public static void GapInPrimesTest()
        {
            //Primes primes = new Primes(500);

            //primes.PrintPrimes();

            Assert.AreEqual(new long[] { 101, 103 }, GapInPrimes.Gap(2, 100, 110));
            Assert.AreEqual(new long[] { 103, 107 }, GapInPrimes.Gap(4, 100, 110));
            Assert.AreEqual(null, GapInPrimes.Gap(6, 100, 110));
            Assert.AreEqual(new long[] { 359, 367 }, GapInPrimes.Gap(8, 300, 400));
            Assert.AreEqual(new long[] { 337, 347 }, GapInPrimes.Gap(10, 300, 400));
        }
Пример #3
0
 public static void Test1()
 {
     Assert.AreEqual(new long[] { 101, 103 }, GapInPrimes.Gap(2, 100, 110));
 }
Пример #4
0
 public static void Test6()
 {
     Assert.AreEqual(new long[] { 337, 347 }, GapInPrimes.Gap(10, 300, 400));
 }
Пример #5
0
 public static void Test5()
 {
     Assert.AreEqual(new long[] { 359, 367 }, GapInPrimes.Gap(8, 300, 400));
 }
Пример #6
0
 public static void Test4()
 {
     Assert.AreEqual(null, GapInPrimes.Gap(6, 100, 110));
 }
Пример #7
0
 public static void Test2()
 {
     Assert.AreEqual(new long[] { 103, 107 }, GapInPrimes.Gap(4, 100, 110));
 }