Example #1
0
        public void ToInt32Test()
        {
            var bc = new SwapBitConverter();

            Assert.AreEqual(1, bc.ToInt32(new byte[] { 0, 0, 0, 1 }, 0));
            Assert.AreEqual(65536, bc.ToInt32(new byte[] { 0, 1, 0, 0 }, 0));
            Assert.AreEqual(-1, bc.ToInt32(new byte[] { 255, 255, 255, 255 }, 0));
        }
        public void ToInt32Test()
        {
            var bc = new SwapBitConverter();

            Assert.AreEqual(1, bc.ToInt32(new byte[] { 0, 0, 0, 1 }, 0));
            Assert.AreEqual(65536, bc.ToInt32(new byte[] { 0, 1, 0, 0 }, 0));
            Assert.AreEqual(-1, bc.ToInt32(new byte[] { 255, 255, 255, 255 }, 0));
        }