コード例 #1
0
        public void FromSwappedBytes()
        {
            Assert.AreEqual(native16, BO.SwappedS16(swapped16));
            Assert.AreEqual(native16, BO.SwappedU16(swapped16));

            Assert.AreEqual(native32, BO.SwappedS32(swapped32));
            Assert.AreEqual(native32, BO.SwappedU32(swapped32));

            Assert.AreEqual(native64, BO.SwappedS64(swapped64));
            Assert.AreEqual(native64, BO.SwappedU64(swapped64));
        }
コード例 #2
0
        public void ToSwappedBytes()
        {
            Assert.AreEqual(swapped16, BO.SwappedBytes(native16));
            Assert.AreEqual(swapped16, BO.SwappedBytes((ushort)native16));

            Assert.AreEqual(swapped32, BO.SwappedBytes(native32));
            Assert.AreEqual(swapped32, BO.SwappedBytes((uint)native32));

            Assert.AreEqual(swapped64, BO.SwappedBytes(native64));
            Assert.AreEqual(swapped64, BO.SwappedBytes((ulong)native64));
        }