Beispiel #1
0
        public void TestBitOps()
        {
            var values = new int[] { int.MinValue, int.MaxValue, 0, 123, -23346457, 2342341, -234234, 23456, 123456789 };

            for (var i = 0; i < values.Length; i++)
            {
                var bytes = BitOperation.AsReadOnly(i);

                var newNum = BitOperation.AsInt(bytes.ToArray());

                Assert.AreEqual(i, newNum);
            }
        }