public void Flag_Byte(int position, int expected) { byte number = 0x13; var flagged = Bits.Byte.Flag(number, position); BitsAssert.AreEqual((byte)expected, flagged); }
public void Flag_UInt32(int position, int expected) { var number = 0x13U; var flagged = Bits.UInt32.Flag(number, position); BitsAssert.AreEqual((uint)expected, flagged); }
public void Unflag_UInt64(int position, int expected) { var number = 0xFCUL; var flagged = Bits.UInt64.Unflag(number, position); BitsAssert.AreEqual((ulong)expected, flagged); }
public void Parse(string pattern, int expected) { var bits = Bits.UInt32.Parse(pattern); BitsAssert.AreEqual((ulong)expected, bits); }
public void Mirror_UInt64(long bits, long expected) { var actual = Bits.UInt64.Mirror((ulong)bits); BitsAssert.AreEqual((ulong)expected, actual); }
public void Mirror_UInt32(long bits, long expected) { var actual = Bits.UInt32.Mirror((uint)bits); BitsAssert.AreEqual((uint)expected, actual); }
public void Mirror_Byte(byte bits, byte expected) { var actual = Bits.Byte.Mirror(bits); BitsAssert.AreEqual(expected, actual); }