Example #1
0
        static void TestHelper(int itemsCount)
        {
            var arrayEquals = new ArrayEqualsBenchmark();

            arrayEquals.ItemsCount = itemsCount;
            arrayEquals.GlobalSetup();
            CheckEqualsTrue(arrayEquals);
            arrayEquals.ArrayA[0] = 1;
            CheckEqualsFalse(arrayEquals);
            arrayEquals.ArrayA[0] = 0;
            arrayEquals.ArrayB[itemsCount - 1] = 1;
            CheckEqualsFalse(arrayEquals);
        }
Example #2
0
        public void Test99999()
        {
            var arrayEquals = new ArrayEqualsBenchmark();

            arrayEquals.ItemsCount = 99999;
            arrayEquals.GlobalSetup();
            CheckEqualsTrue(arrayEquals);
            for (int i = 0; i < 31; i++)
            {
                int index0 = 99999 - 1 - i;
                arrayEquals.ArrayA[index0] = 1;
                CheckEqualsFalse(arrayEquals);
                arrayEquals.ArrayB[index0] = 1;
                CheckEqualsTrue(arrayEquals);
            }
        }