public void mulTest() { CNumber_Integer target = new CNumber_Integer("0x7FFF.FFFF"); CNumber_Integer two = new CNumber_Integer("0x2"); target = (CNumber_Integer)target.mul(two); Assert.AreEqual("0xFFFF.FFFE", target.AsString); target = (CNumber_Integer)target.mul(two); Assert.AreEqual("0x1.FFFF.FFFC", target.AsString); }
public void Check_Multiplication_03() { CNumber_Integer a = new CNumber_Integer(378); CNumber_Integer b = (CNumber_Integer)a.mul(a); Assert.AreEqual(142884, b.AsInteger); Assert.AreEqual(3, b.size); }
public void Check_Multiplication_02() { CNumber_Integer three = new CNumber_Integer(3); CNumber_Integer a = new CNumber_Integer(126); CNumber_Integer b = (CNumber_Integer)a.mul(three); Assert.AreEqual(378, b.AsInteger); Assert.AreEqual(2, b.size); }
public void Check_Multiplication_01() { CNumber_Integer three = new CNumber_Integer(3); CNumber_Integer a = new CNumber_Integer(42); CNumber_Integer b = (CNumber_Integer)a.mul(three); // check if the operdands are unchanged Assert.AreEqual(42, a.AsInteger); Assert.AreEqual(3, three.AsInteger); // check the result Assert.AreEqual(126, b.AsInteger); Assert.AreEqual(1, b.size); }