Beispiel #1
0
        public void GroupTest521()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[8];
            ints[1] = 1;
            ints[2] = 4;
            ints[3] = 320;
            ints[5] = 16;
            ints[6] = 2;
            ints[7] = 256;
            intss   = this.GroupTest(challengeClusterSolution, ints, 2);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(2, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(6, intss[0].Length);
            Assert.AreEqual <int>(0, intss[0][0]);
            Assert.AreEqual <int>(0, intss[0][1]);
            Assert.AreEqual <int>(1, intss[0][2]);
            Assert.AreEqual <int>(2, intss[0][3]);
            Assert.AreEqual <int>(4, intss[0][4]);
            Assert.AreEqual <int>(16, intss[0][5]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(2, intss[1].Length);
            Assert.AreEqual <int>(320, intss[1][0]);
            Assert.AreEqual <int>(256, intss[1][1]);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #2
0
        public void GroupTest531()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[4];
            ints[0] = 8;
            ints[1] = 576;
            intss   = this.GroupTest(challengeClusterSolution, ints, 8);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(4, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(2, intss[0].Length);
            Assert.AreEqual <int>(0, intss[0][0]);
            Assert.AreEqual <int>(0, intss[0][1]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(1, intss[1].Length);
            Assert.AreEqual <int>(576, intss[1][0]);
            Assert.IsNotNull((object)(intss[2]));
            Assert.AreEqual <int>(1, intss[2].Length);
            Assert.AreEqual <int>(8, intss[2][0]);
            Assert.IsNotNull((object)(intss[3]));
            Assert.AreEqual <int>(0, intss[3].Length);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #3
0
        public void GroupTest786()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[3];
            ints[0] = 1592524933;
            ints[1] = 1969057606;
            ints[2] = -925165067;
            intss   = this.GroupTest(challengeClusterSolution, ints, 6);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(3, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(1, intss[0].Length);
            Assert.AreEqual <int>(-925165067, intss[0][0]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(1, intss[1].Length);
            Assert.AreEqual <int>(1969057606, intss[1][0]);
            Assert.IsNotNull((object)(intss[2]));
            Assert.AreEqual <int>(1, intss[2].Length);
            Assert.AreEqual <int>(1592524933, intss[2][0]);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
        public void GetClosestClusterIndexTest202()
        {
            ChallengeClusterSolution challengeClusterSolution;
            Cluster        cluster;
            Cluster        cluster1;
            Cluster        cluster2;
            Cluster        cluster3;
            List <Cluster> list;
            int            i;

            challengeClusterSolution = new ChallengeClusterSolution();
            cluster  = new Cluster(1);
            cluster1 = new Cluster(0);
            cluster2 = new Cluster(2);
            cluster3 = new Cluster(0);
            Cluster[] clusters = new Cluster[7];
            clusters[1] = cluster;
            clusters[2] = cluster1;
            clusters[5] = cluster2;
            clusters[6] = cluster3;
            list        = new List <Cluster>((IEnumerable <Cluster>)clusters);
            i           = this.GetClosestClusterIndexTest(challengeClusterSolution, list, 0);
            Assert.AreEqual <int>(2, i);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNull(challengeClusterSolution.Groups);
        }
Beispiel #5
0
        public void GroupTest600()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[4];
            ints[0] = 596658336;
            ints[1] = 16;
            ints[2] = 1;
            intss   = this.GroupTest(challengeClusterSolution, ints, 2);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(2, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(3, intss[0].Length);
            Assert.AreEqual <int>(0, intss[0][0]);
            Assert.AreEqual <int>(1, intss[0][1]);
            Assert.AreEqual <int>(16, intss[0][2]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(1, intss[1].Length);
            Assert.AreEqual <int>(596658336, intss[1][0]);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #6
0
        public void GroupTest893()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[4];
            ints[1] = -925165067;
            intss   = this.GroupTest(challengeClusterSolution, ints, 5);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(4, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(1, intss[0].Length);
            Assert.AreEqual <int>(-925165067, intss[0][0]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(3, intss[1].Length);
            Assert.AreEqual <int>(0, intss[1][0]);
            Assert.AreEqual <int>(0, intss[1][1]);
            Assert.AreEqual <int>(0, intss[1][2]);
            Assert.IsNotNull((object)(intss[2]));
            Assert.AreEqual <int>(0, intss[2].Length);
            Assert.IsNotNull((object)(intss[3]));
            Assert.AreEqual <int>(0, intss[3].Length);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #7
0
        public void GroupTest424()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[14];
            intss = this.GroupTest(challengeClusterSolution, ints, 15);
        }
Beispiel #8
0
 public int[][] GroupTest(
     [PexAssumeUnderTest] ChallengeClusterSolution target,
     int[] values,
     int groups
     )
 {
     int[][] result = target.Group(values, groups);
     return(result);
     // TODO: add assertions to method ChallengeClusterSolutionTest.GroupTest(ChallengeClusterSolution, Int32[], Int32)
 }
Beispiel #9
0
        public int GetClosestClusterIndexTest(
            [PexAssumeUnderTest] ChallengeClusterSolution target,
            List <Cluster> clusters,
            int value
            )
        {
            int result = target.GetClosestClusterIndex(clusters, value);

            return(result);
            // TODO: add assertions to method ChallengeClusterSolutionTest.GetClosestClusterIndexTest(ChallengeClusterSolution, List`1<Cluster>, Int32)
        }
        public void GetClosestClusterIndexTest243()
        {
            ChallengeClusterSolution challengeClusterSolution;
            int i;

            challengeClusterSolution = new ChallengeClusterSolution();
            i = this.GetClosestClusterIndexTest
                    (challengeClusterSolution, (List <Cluster>)null, 0);
            Assert.AreEqual <int>(-1, i);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNull(challengeClusterSolution.Groups);
        }
        public void GetClosestClusterIndexTest962()
        {
            ChallengeClusterSolution challengeClusterSolution;
            List <Cluster>           list;
            int i;

            challengeClusterSolution = new ChallengeClusterSolution();
            Cluster[] clusters = new Cluster[1];
            list = new List <Cluster>((IEnumerable <Cluster>)clusters);
            i    = this.GetClosestClusterIndexTest(challengeClusterSolution, list, 0);
            Assert.AreEqual <int>(-1, i);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNull(challengeClusterSolution.Groups);
        }
Beispiel #12
0
        public void GroupTest63()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            intss = this.GroupTest(challengeClusterSolution, (int[])null, 0);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(0, intss.Length);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #13
0
        public void GroupTest896()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[10];
            ints[1] = 1;
            ints[3] = 32;
            ints[4] = 64;
            ints[5] = 4;
            ints[6] = 20;
            ints[7] = 128;
            ints[8] = 512;
            ints[9] = 16;
            intss   = this.GroupTest(challengeClusterSolution, ints, 7);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(7, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(3, intss[0].Length);
            Assert.AreEqual <int>(0, intss[0][0]);
            Assert.AreEqual <int>(0, intss[0][1]);
            Assert.AreEqual <int>(1, intss[0][2]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(1, intss[1].Length);
            Assert.AreEqual <int>(512, intss[1][0]);
            Assert.IsNotNull((object)(intss[2]));
            Assert.AreEqual <int>(1, intss[2].Length);
            Assert.AreEqual <int>(128, intss[2][0]);
            Assert.IsNotNull((object)(intss[3]));
            Assert.AreEqual <int>(1, intss[3].Length);
            Assert.AreEqual <int>(64, intss[3][0]);
            Assert.IsNotNull((object)(intss[4]));
            Assert.AreEqual <int>(1, intss[4].Length);
            Assert.AreEqual <int>(32, intss[4][0]);
            Assert.IsNotNull((object)(intss[5]));
            Assert.AreEqual <int>(2, intss[5].Length);
            Assert.AreEqual <int>(16, intss[5][0]);
            Assert.AreEqual <int>(20, intss[5][1]);
            Assert.IsNotNull((object)(intss[6]));
            Assert.AreEqual <int>(1, intss[6].Length);
            Assert.AreEqual <int>(4, intss[6][0]);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #14
0
        public void GroupTest828()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[1];
            intss = this.GroupTest(challengeClusterSolution, ints, 128);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(1, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(1, intss[0].Length);
            Assert.AreEqual <int>(0, intss[0][0]);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }
Beispiel #15
0
        public void GroupTest349()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[20];
            ints[0] = -1734134831;
            ints[1] = 799078761;
            ints[2] = 1;
            ints[3] = 4;
            ints[4] = 1;
            ints[5] = -1472908865;
            ints[6] = -2007514814;
            ints[7] = -1;
            ints[8] = 489131374;
            ints[9] = 845481679;
            intss   = this.GroupTest(challengeClusterSolution, ints, 21);
        }
        public void GetClosestClusterIndexTest532()
        {
            ChallengeClusterSolution challengeClusterSolution;
            Cluster        cluster;
            Cluster        cluster1;
            List <Cluster> list;
            int            i;

            challengeClusterSolution = new ChallengeClusterSolution();
            cluster  = new Cluster(-925165067);
            cluster1 = new Cluster(1592524933);
            Cluster[] clusters = new Cluster[2];
            clusters[0] = cluster;
            clusters[1] = cluster1;
            list        = new List <Cluster>((IEnumerable <Cluster>)clusters);
            i           = this.GetClosestClusterIndexTest(challengeClusterSolution, list, 1969057606);
            Assert.AreEqual <int>(1, i);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNull(challengeClusterSolution.Groups);
        }
Beispiel #17
0
        public void GroupTest367()
        {
            ChallengeClusterSolution challengeClusterSolution;

            int[][] intss;
            challengeClusterSolution = new ChallengeClusterSolution();
            int[] ints = new int[3];
            ints[0] = -1093040385;
            ints[2] = 9390692;
            intss   = this.GroupTest(challengeClusterSolution, ints, 2);
            Assert.IsNotNull((object)intss);
            Assert.AreEqual <int>(2, intss.Length);
            Assert.IsNotNull((object)(intss[0]));
            Assert.AreEqual <int>(1, intss[0].Length);
            Assert.AreEqual <int>(-1093040385, intss[0][0]);
            Assert.IsNotNull((object)(intss[1]));
            Assert.AreEqual <int>(2, intss[1].Length);
            Assert.AreEqual <int>(0, intss[1][0]);
            Assert.AreEqual <int>(9390692, intss[1][1]);
            Assert.IsNotNull((object)challengeClusterSolution);
            Assert.IsNotNull(challengeClusterSolution.Groups);
            Assert.IsTrue
                (object.ReferenceEquals(challengeClusterSolution.Groups, (object)intss));
        }