public void MaxUInt32TwiceToBytes() { Integer256 value = new Integer256(); var newvalue = value.Add(UInt32.MaxValue).Add(UInt32.MaxValue); var result = newvalue.ToBytes(); AreEqual(result, new byte[] { 0x01, 0xff, 0xff, 0xff, 0xfe }); }
public void AddOneToOne() { var one = new Integer256().Add(1); var value = one.Add(one); var result = value.ToBytes(); AreEqual(result, new byte[] { 0x02 }); }
public void MaxUInt32PlusOneToBytes() { Integer256 value = new Integer256(); var newvalue = value.Add(UInt32.MaxValue).Add(1); var result = newvalue.ToBytes(); AreEqual(result, new byte[] { 0x01, 0x00, 0x00, 0x00, 0x00 }); }
public void OneToBytes() { Integer256 value = new Integer256(); var newvalue = value.Add(1); var result = newvalue.ToBytes(); AreEqual(result, new byte[] { 0x01 }); }