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