Beispiel #1
0
        static bool performAnyTest(XBridgeTest xLBT, TestDataElements data)
        {
            bool bReturn = true;

            bReturn = testAny(null, data.Byte, xLBT) && bReturn;
            bReturn = testAny(null, data.Short, xLBT) && bReturn;
            bReturn = testAny(null, data.UShort, xLBT) && bReturn;
            bReturn = testAny(null, data.Long, xLBT) && bReturn;
            bReturn = testAny(null, data.ULong, xLBT) && bReturn;
            bReturn = testAny(null, data.Hyper, xLBT) && bReturn;
            bReturn = testAny(null, data.UHyper, xLBT) && bReturn;
            bReturn = testAny(null, data.Float, xLBT) && bReturn;
            bReturn = testAny(null, data.Double, xLBT) && bReturn;
            bReturn = testAny(null, data.Enum, xLBT) && bReturn;
            bReturn = testAny(null, data.String, xLBT) && bReturn;
            bReturn = testAny(typeof(XWeak), data.Interface, xLBT) && bReturn;
            bReturn = testAny(null, data, xLBT) && bReturn;

            {
                Any a1 = new Any(true);
                Any a2 = xLBT.transportAny(a1);
                bReturn = compareData(a2, a1) && bReturn;
            }

            {
                Any a1 = new Any('A');
                Any a2 = xLBT.transportAny(a1);
                bReturn = compareData(a2, a1) && bReturn;
            }
            return(bReturn);
        }
Beispiel #2
0
// template < class type >
        static bool testAny(Type typ, Object value, XBridgeTest xLBT)
        {
            Any any;

            if (typ == null)
            {
                any = new Any(value.GetType(), value);
            }
            else
            {
                any = new Any(typ, value);
            }

            Any  any2 = xLBT.transportAny(any);
            bool ret;

            if (!(ret = compareData(any, any2)))
            {
                Console.WriteLine("any is different after roundtrip: in {0}, out {1}\n",
                                  any.Type.FullName, any2.Type.FullName);
            }
            return(ret);
        }
        // template < class type >
        static bool testAny(Type typ, Object  value, XBridgeTest xLBT )
        {
            Any any;
            if (typ == null)
            any = new Any(value.GetType(), value);
            else
            any = new Any(typ, value);

            Any any2 = xLBT.transportAny(any);
            bool ret;
            if( ! (ret= compareData(any, any2)))
            {
            Console.WriteLine("any is different after roundtrip: in {0}, out {1}\n",
                          any.Type.FullName, any2.Type.FullName);
            }
            return ret;
        }
        static bool performAnyTest(XBridgeTest xLBT,  TestDataElements data)
        {
            bool bReturn = true;
            bReturn = testAny( null, data.Byte ,xLBT ) && bReturn;
            bReturn = testAny( null, data.Short,xLBT ) && bReturn;
            bReturn = testAny(  null, data.UShort,xLBT ) && bReturn;
            bReturn = testAny(  null, data.Long,xLBT ) && bReturn;
            bReturn = testAny(  null, data.ULong,xLBT ) && bReturn;
            bReturn = testAny(  null, data.Hyper,xLBT ) && bReturn;
            bReturn = testAny(  null,data.UHyper,xLBT ) && bReturn;
            bReturn = testAny( null, data.Float,xLBT ) && bReturn;
            bReturn = testAny( null, data.Double,xLBT ) && bReturn;
            bReturn = testAny( null, data.Enum,xLBT ) && bReturn;
            bReturn = testAny( null, data.String,xLBT ) && bReturn;
            bReturn = testAny(typeof(XWeak), data.Interface,xLBT ) && bReturn;
            bReturn = testAny(null, data, xLBT ) && bReturn;

            {
            Any a1= new Any(true);
            Any a2 = xLBT.transportAny( a1 );
            bReturn = compareData(a2, a1) && bReturn;
            }

            {
            Any a1= new Any('A');
            Any a2 = xLBT.transportAny(a1);
            bReturn = compareData(a2, a1) && bReturn;
            }
            return bReturn;
        }