Package org.omg.CORBA

Examples of org.omg.CORBA.Any.extract_float()


            TEST(d1.get_float() > 199.0f && d1.get_float() < 199.1f);
            d1.insert_float(6500.10001f);
            TEST(d1.get_float() > 6500.0f && d1.get_float() < 6501.0f);

            av = d1.to_any();
            float floatVal = av.extract_float();
            TEST(floatVal > 6500.1 && floatVal < 6500.2);

            any.insert_float((float) 6500.10001);
            d2 = factory.create_dyn_any(any);
            TEST(d1.equal(d2));
View Full Code Here


        any.insert_float(floatValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:float";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_float);
        float floatResult = result.extract_float();
        assertTrue(floatResult == floatValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
       
        String stringValue = "test string";
View Full Code Here

        d1.insert_float(6500.10001f);
        TEST(d1.get_float() > 6500.0f && d1.get_float() < 6501.0f);

        av = d1.to_any();

        float floatVal = av.extract_float();
        TEST(floatVal > 6500.1 && floatVal < 6500.2);

        any.insert_float((float) 6500.10001);
        d2 = factory.create_dyn_any(any);
        TEST(d1.equal(d2));
View Full Code Here

        any.insert_float(floatValue);
        anyHandler.setValue(any);
        expectedSchemaType = "xs:float";
        result = anyHandler.getValue();
        assertTrue(result.type().kind().value() == TCKind._tk_float);
        float floatResult = result.extract_float();
        assertTrue(floatResult == floatValue);
        resultSchemaType = anyHandler.getSchemaType();
        assertTrue(resultSchemaType.equals(expectedSchemaType));
       
        String stringValue = "test string";
View Full Code Here

            TEST(d1.get_float() > 199.0f && d1.get_float() < 199.1f);
            d1.insert_float(6500.10001f);
            TEST(d1.get_float() > 6500.0f && d1.get_float() < 6501.0f);

            av = d1.to_any();
            float floatVal = av.extract_float();
            TEST(floatVal > 6500.1 && floatVal < 6500.2);

            any.insert_float((float) 6500.10001);
            d2 = factory.create_dyn_any(any);
            TEST(d1.equal(d2));
View Full Code Here

        throws Exception
    {
        float testValue = (float) 4711.0;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_float(testValue);
        assertEquals(testValue, outAny.extract_float(), 0.0);

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_float(), 0.0);
        assertTrue(outAny.equal(inAny));
View Full Code Here

        outAny.insert_float(testValue);
        assertEquals(testValue, outAny.extract_float(), 0.0);

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_float(), 0.0);
        assertTrue(outAny.equal(inAny));
    }

    public void test_float_streamable()
        throws Exception
View Full Code Here

        throws Exception
    {
        float testValue = (float) 4711.0;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Streamable(new FloatHolder(testValue));
        assertEquals(testValue, outAny.extract_float(), 0.0);

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_float(), 0.0);
        assertTrue(outAny.equal(inAny));
View Full Code Here

        outAny.insert_Streamable(new FloatHolder(testValue));
        assertEquals(testValue, outAny.extract_float(), 0.0);

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_float(), 0.0);
        assertTrue(outAny.equal(inAny));
    }

    public void test_float_stream()
    {
View Full Code Here

        Any any = setup.getClientOrb().create_any();
        any.type (setup.getClientOrb().get_primitive_tc(TCKind.tk_float));
        any.create_output_stream().write_float (testValue);
        // don't bounce, because we want to extract from the
        // output stream we just created
        float outValue = any.extract_float();
        assertEquals (testValue, outValue, 0.0);
    }

    public void test_double()
        throws Exception
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.