Esempio n. 1
0
 public void ImplicitInt32OverflowConversion()
 {
     Assert.IsTrue(
         _int32OverflowData.All(
             value =>
     {
         try { InteropInt16 interopInt16 = value; return(false); }
         catch (OverflowException) { return(true); }
     }));
 }
Esempio n. 2
0
 public void ImplicitInt32Conversion()
 {
     Assert.IsTrue(
         _int32Data.All(
             value =>
     {
         InteropInt16 interopInt16 = value;
         return(value == interopInt16);
     }));
 }
Esempio n. 3
0
        public void EqualsTest()
        {
            var data = new Int16[, ] {
                { 0, 0 }, { -1, -1 }, { 1, 1 }
            };
            var length = data.GetLength(0);

            for (var i = 0; i < length; i++)
            {
                InteropInt16 interopInt16  = data[i, 0];
                InteropInt16 interopInt162 = data[i, 1];
                Assert.IsTrue(interopInt16.Equals(interopInt162));
            }
        }