Ejemplo n.º 1
0
        public void CheckUInt32Array()
        {
            MemoryStream buffer = new MemoryStream();
            IFieldWriter writer = new FieldWriter(buffer);
            IFieldReader reader = new FieldReader(buffer);

            UInt32[] array1 = new UInt32[] {};
            UInt32[] array2 = new UInt32[] { 1 };
            UInt32[] array3 = new UInt32[] { 0, 0, 0, 0, 0, 0 };
            UInt32[] array4 = new UInt32[] { 0, 1, 2, 3, 4, 5 };
            UInt32[] array5 = new UInt32[] { 0, 1, 1, 2, 2, 2 };
            UInt32[] array6 = new UInt32[] { 0, 1, 1, 2, 2, 2, 3 };
            writer.Write(array1);
            writer.Write(array2);
            writer.Write(array3);
            writer.Write(array4);
            writer.Write(array5);
            writer.Write(array6);
            buffer.Position = 0;
            CompareArray(array1, reader.ReadUInt32Array());
            CompareArray(array2, reader.ReadUInt32Array());
            CompareArray(array3, reader.ReadUInt32Array());
            CompareArray(array4, reader.ReadUInt32Array());
            CompareArray(array5, reader.ReadUInt32Array());
            CompareArray(array6, reader.ReadUInt32Array());
        }