Ejemplo n.º 1
0
        public void TestBigEndianSerializationForEveryUInt24()
        {
            Byte[] buffer = new Byte[3];

            for (UInt32 i = UInt24.MinValue; i <= UInt24.MaxValue; i++)
            {
                buffer.BigEndianSetUInt24(0, i);
                Assert.AreEqual((Byte)(i >> 16), buffer[0]);
                Assert.AreEqual((Byte)(i >> 8), buffer[1]);
                Assert.AreEqual((Byte)i, buffer[2]);
                Assert.AreEqual(i, buffer.BigEndianReadUInt24(0));
            }
        }