Beispiel #1
0
 public void TestToShortWithLargeValue()
 {
     try
     {
         ScalarValue value = String("32768");
         value.ToShort();
         Assert.Fail();
     }
     catch (FastException e)
     {
         Assert.AreEqual(FastConstants.R4_NUMERIC_VALUE_TOO_LARGE, e.Code);
     }
 }
Beispiel #2
0
 public void TestToShortWithLargeValue()
 {
     try
     {
         ScalarValue value = String("32768");
         value.ToShort();
         Assert.Fail();
     }
     catch (RepErrorException e)
     {
         Assert.AreEqual(RepError.NumericValueTooLarge, e.Error);
     }
 }
Beispiel #3
0
        public void TestToShort()
        {
            ScalarValue value = String("128");

            Assert.AreEqual(0x80, value.ToShort());
        }