Ejemplo n.º 1
0
        public void Test_Memory2DT_ToString()
        {
            int[,] array =
            {
                { 1, 2, 3 },
                { 4, 5, 6 }
            };

            Memory2D <int> memory2d = new Memory2D <int>(array);

            // Here we just want to verify that the type is nicely printed as expected, along with the size
            string text = memory2d.ToString();

            const string expected = "Microsoft.Toolkit.HighPerformance.Memory2D<System.Int32>[2, 3]";

            Assert.AreEqual(text, expected);
        }