示例#1
0
        public void CanHandleMillionCellInput()
        {
            var mat = new Color[1000, 1000];

            var area = Iterative.FindMaxConnectedColors((mat));

            Assert.Equal(1000000, area);
        }
示例#2
0
        public void CanSolveTechLeadExample()
        {
            var mat = Examples.TechLeadExample();

            var area = Iterative.FindMaxConnectedColors(mat);

            Assert.Equal(5, area);
        }
示例#3
0
        public void CanSolveAnotherExampleWithMaxOf5()
        {
            var mat = Examples.AnotherExampleWithMaxOf5();

            var area = Iterative.FindMaxConnectedColors(mat);

            Assert.Equal(5, area);
        }
示例#4
0
        public void IsSizeOfUniformMatrix()
        {
            var mat = new Color[7, 3];

            var area = Iterative.FindMaxConnectedColors((mat));

            Assert.Equal(21, area);
        }
示例#5
0
        public void IsZeroOnEmpty()
        {
            var mat = new Color[0, 0] {
            };

            var area = Iterative.FindMaxConnectedColors((mat));

            Assert.Equal(0, area);
        }