當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Ice.MapUtil.equals方法代碼示例

本文整理匯總了TypeScript中ice.Ice.MapUtil.equals方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Ice.MapUtil.equals方法的具體用法?TypeScript Ice.MapUtil.equals怎麽用?TypeScript Ice.MapUtil.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ice.Ice.MapUtil的用法示例。


在下文中一共展示了Ice.MapUtil.equals方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: run


//.........這裏部分代碼省略.........
            Test.su0 == Test.su2 &&
            Test.su0 == literals[28] &&
            Test.su0 == literals[29] &&
            Test.su0 == literals[30]);

    await prx.ice_ping();

    test(await prx.ice_isA(Test.MyClass.ice_staticId()));

    test((await prx.ice_id()) === Test.MyDerivedClass.ice_staticId());

    test((await prx.ice_ids()).length === 3);

    await prx.opVoid();

    {
        const [retval, p3] = await prx.opByte(0xff, 0x0f);
        test(p3 === 0xf0);
        test(retval === 0xff);
    }

    {
        const [retval, p3] = await prx.opBool(true, false);
        test(p3);
        test(!retval);
    }

    {
        const lo = new Ice.Long(0, 12);
        const [retval, s, i, l] = await prx.opShortIntLong(10, 11, lo);

        test(s === 10);
        test(i === 11);
        test(l.equals(lo));
        test(retval.equals(lo));
    }

    {
        const [retval, f, d] = await prx.opFloatDouble(3.14, 1.1E10);
        test((f - 3.14) <= 0.01);
        test(d == 1.1E10);
        test(retval == 1.1E10);
    }

    try
    {
        await prx.opByte(0xffff, 0xff0f);
        test(false);
    }
    catch(ex)
    {
        test(ex instanceof Ice.MarshalException, ex);
    }

    try
    {
        await prx.opShortIntLong(-32768 - 1, 0, new Ice.Long(0));
        test(false);
    }
    catch(ex)
    {
        test(ex instanceof Ice.MarshalException, ex);
    }

    try
    {
開發者ID:zeroc-ice,項目名稱:ice-debian-packaging,代碼行數:67,代碼來源:Twoways.ts

示例2: allTests


//.........這裏部分代碼省略.........
        b1 = communicator.stringToProxy("test -f 'facet@test'");
        test(b1.ice_getIdentity().name === "test" && b1.ice_getIdentity().category.length === 0 &&
                b1.ice_getFacet() === "facet@test" && b1.ice_getAdapterId().length === 0);
        b1 = communicator.stringToProxy("test -f 'facet@test'@test");
        test(b1.ice_getIdentity().name === "test" && b1.ice_getIdentity().category.length === 0 &&
                b1.ice_getFacet() === "facet@test" && b1.ice_getAdapterId() === "test");

        try
        {
            b1 = communicator.stringToProxy("test -f facet@test @test");
            test(false);
        }
        catch(ex)
        {
            test(ex instanceof Ice.ProxyParseException, ex);
        }
        b1 = communicator.stringToProxy("test");
        test(b1.ice_isTwoway());
        b1 = communicator.stringToProxy("test -t");
        test(b1.ice_isTwoway());
        b1 = communicator.stringToProxy("test -o");
        test(b1.ice_isOneway());
        b1 = communicator.stringToProxy("test -O");
        test(b1.ice_isBatchOneway());
        b1 = communicator.stringToProxy("test -d");
        test(b1.ice_isDatagram());
        b1 = communicator.stringToProxy("test -D");
        test(b1.ice_isBatchDatagram());
        b1 = communicator.stringToProxy("test");
        test(!b1.ice_isSecure());
        b1 = communicator.stringToProxy("test -s");
        test(b1.ice_isSecure());

        test(b1.ice_getEncodingVersion().equals(Ice.currentEncoding()));

        b1 = communicator.stringToProxy("test -e 1.0");
        test(b1.ice_getEncodingVersion().major === 1 && b1.ice_getEncodingVersion().minor === 0);

        b1 = communicator.stringToProxy("test -e 6z.5");
        test(b1.ice_getEncodingVersion().major === 6 && b1.ice_getEncodingVersion().minor === 5);

        b1 = communicator.stringToProxy("test -p 1.0 -e 1.0");
        test(b1.toString() === "test -t -e 1.0");

        b1 = communicator.stringToProxy("test -p 6.5 -e 1.0");
        test(b1.toString() === "test -t -p 6.5 -e 1.0");

        try
        {
            b1 = communicator.stringToProxy("test:" + defaultProtocol + "@adapterId");
            test(false);
        }
        catch(ex)
        {
            test(ex instanceof Ice.EndpointParseException, ex);
        }

        try
        {
            b1 = communicator.stringToProxy("test::" + defaultProtocol);
            test(false);
        }
        catch(ex)
        {
            test(ex instanceof Ice.EndpointParseException, ex);
        }
開發者ID:zeroc-ice,項目名稱:ice-debian-packaging,代碼行數:67,代碼來源:Client.ts


注:本文中的ice.Ice.MapUtil.equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。