예제 #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());
     }
 }
예제 #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());
     }
 }