示例#1
0
        public void TestSpiralMatrix2()
        {
            int[,] input =
            {
                { 1, 2 },
            };

            var list = SpiralMatrix.SpiralOrder(input);

            string exp = "12";

            for (int i = 0; i < exp.Length; i++)
            {
                Assert.IsTrue(list[i] == int.Parse(exp[i].ToString()));
            }

            Assert.IsTrue(list.Count == exp.Length);
        }