Example #1
0
 public void IntFitsLong()
 {
     using (var a = new HugeInt(long.MaxValue))
     {
         Assert.IsTrue(a.FitsLong());
         a.Value = a + 1;
         Assert.IsFalse(a.FitsLong());
         a.SetTo(long.MinValue);
         Assert.IsTrue(a.FitsLong());
         a.Value = a - 1;
         Assert.IsFalse(a.FitsLong());
     }
 }
Example #2
0
 public void IntFitsLong()
 {
     using (var a = new HugeInt(long.MaxValue))
     {
         Assert.IsTrue(a.FitsLong());
         a.Value = a + 1;
         Assert.IsFalse(a.FitsLong());
         a.SetTo(long.MinValue);
         Assert.IsTrue(a.FitsLong());
         a.Value = a - 1;
         Assert.IsFalse(a.FitsLong());
     }
 }