示例#1
0
 public void TestEquivalent()
 {
     ULongTC other = new ULongTC();
     Assert.IsTrue(m_tc.equivalent(other), "not equal");
     LongTC other2 = new LongTC();
     Assert.IsTrue(!m_tc.equivalent(other2), "equal but shoudln't");
 }
示例#2
0
 public void Setup()
 {
     m_tc = new ULongTC();
 }
示例#3
0
 public void BoxULongFromCls()
 {
     int val = 11;
     omg.org.CORBA.TypeCode tc = new ULongTC();
     Any anyContainer = new Any(val, tc);
     Assert.AreEqual(tc, anyContainer.Type,"wrong tc");
     Assert.AreEqual((uint)val, anyContainer.Value, "wrong val");
     Assert.AreEqual(((uint)val).GetType(), anyContainer.Value.GetType(), "wrong val");
     Assert.AreEqual(val, anyContainer.ClsValue, "wrong val");
 }
示例#4
0
 public void BoxULongFromClsOutsideRange()
 {
     int val = -11;
     omg.org.CORBA.TypeCode tc = new ULongTC();
     Any anyContainer = new Any(val, tc);
     Assert.AreEqual(tc, anyContainer.Type, "wrong tc");
     // do an unchecked cast, overflow no issue here
     Assert.AreEqual(unchecked((uint)val), anyContainer.Value, "wrong val");
     Assert.AreEqual(unchecked((uint)val).GetType(), anyContainer.Value.GetType(), "wrong val");
     Assert.AreEqual(val, anyContainer.ClsValue, "wrong val");
 }
示例#5
0
 public void BoxULong()
 {
     uint val = 11;
     omg.org.CORBA.TypeCode tc = new ULongTC();
     Any anyContainer = new Any(val, tc);
     Assert.AreEqual(tc, anyContainer.Type, "wrong tc");
     Assert.AreEqual(val, anyContainer.Value, "wrong val");
     Assert.AreEqual((int)val, anyContainer.ClsValue, "wrong val");
     Assert.AreEqual(ReflectionHelper.Int32Type,
                            anyContainer.ClsValue.GetType(), "wrong val type");
 }