public void TestEquivalent()
 {
     ULongLongTC other = new ULongLongTC();
     Assert.IsTrue(m_tc.equivalent(other), "not equal");
     LongLongTC other2 = new LongLongTC();
     Assert.IsTrue(!m_tc.equivalent(other2), "equal but shoudln't");
 }
 public void Setup()
 {
     m_tc = new ULongLongTC();
 }
Exemple #3
0
 public void BoxULongLongFromCls()
 {
     long val = 11;
     omg.org.CORBA.TypeCode tc = new ULongLongTC();
     Any anyContainer = new Any(val, tc);
     Assert.AreEqual(tc, anyContainer.Type, "wrong tc");
     Assert.AreEqual((ulong)val, anyContainer.Value, "wrong val");
     Assert.AreEqual(((ulong)val).GetType(), anyContainer.Value.GetType(), "wrong val");
     Assert.AreEqual(val, anyContainer.ClsValue, "wrong val");
 }
Exemple #4
0
 public void BoxULongLongFromClsOutsideRange()
 {
     long val = -11;
     omg.org.CORBA.TypeCode tc = new ULongLongTC();
     Any anyContainer = new Any(val, tc);
     Assert.AreEqual(tc, anyContainer.Type, "wrong tc");
     // do an unchecked cast, overflow no issue here
     Assert.AreEqual(unchecked((ulong)val), anyContainer.Value, "wrong val");
     Assert.AreEqual(unchecked((ulong)val).GetType(), anyContainer.Value.GetType(), "wrong val");
     Assert.AreEqual(val, anyContainer.ClsValue, "wrong val");
 }
Exemple #5
0
 public void BoxULongLong()
 {
     ulong val = 11;
     omg.org.CORBA.TypeCode tc = new ULongLongTC();
     Any anyContainer = new Any(val, tc);
     Assert.AreEqual(tc, anyContainer.Type, "wrong tc");
     Assert.AreEqual(val, anyContainer.Value, "wrong val");
     Assert.AreEqual((long)val, anyContainer.ClsValue, "wrong val");
     Assert.AreEqual(ReflectionHelper.Int64Type,
                            anyContainer.ClsValue.GetType(), "wrong val type");
 }