Examples of checkType()


Examples of etch.bindings.java.msg.StructValue.checkType()

  }
 
  private void testExcp5Export(String msg, int code, Object value)
  {
    StructValue sv = vf.exportCustomValue( new Excp5( msg, code, value ) );
    sv.checkType( ValueFactoryTest1._mt_etch_tests_Test1_Excp5 );
    assertEquals( 3, sv.size() );
    assertEquals( msg, sv.get( ValueFactoryTest1._mf_msg ) );
    assertEquals( code, sv.get( ValueFactoryTest1._mf_code ) );
    assertEquals( value, sv.get( ValueFactoryTest1._mf_x ) );   
  }
View Full Code Here

Examples of etch.bindings.java.msg.StructValue.checkType()

 
 
  private void testExcp6Export(String msg, int code, Object[] value)
  {
    StructValue sv = vf.exportCustomValue( new Excp6( msg, code, value ) );
    sv.checkType( ValueFactoryTest1._mt_etch_tests_Test1_Excp6 );
    assertEquals( 3, sv.size() );
    assertEquals( msg, sv.get( ValueFactoryTest1._mf_msg ) );
    assertEquals( code, sv.get( ValueFactoryTest1._mf_code ) );
    assertEquals( value, sv.get( ValueFactoryTest1._mf_x ) );   
  }
View Full Code Here

Examples of jni.Argument.checkType()

                    String newCType = getStringValue(type);
                    argument.setCType(newCType);

                    String newKind = getStringValue(kind);
                    argument.setKind(newKind);
                    argument.checkType();
                    foundOne = true;
                }

                if (foundOne) {
                    argument.setExpression();
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.Message.checkType()

      int timeout = disableTimeout ? 0 : responseType.getTimeout();
      Mailbox.Element mbe = mb.read( timeout);
      if (mbe == null)
        throw new TimeoutException( "timeout waiting for "+responseType );
      Message rmsg = mbe.msg;
      rmsg.checkType( responseType );
      Object r = rmsg.get( responseType.getResponseField() );
      if (r instanceof Exception)
      {
        Exception e = (Exception) r;
        e.fillInStackTrace();
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.Message.checkType()

  /** @throws Exception */
  @Test
  public void newMessage() throws Exception
  {
    Message msg = remote._newMessage( mt );
    msg.checkType( mt );
    assertSame( vf, msg.vf() );
  }

  /** @throws Exception */
  @Test
 
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.Message.checkType()

      21, 10, 44, -77, // x
      1, // tiny int = 1 (value)
      -127 // NONE
    };
    Message msg = bytes2msg( buf );
    msg.checkType( add );
    Assert.assertEquals( 3, msg.size() );
    Assert.assertEquals( 1, msg.get( x ) );
    Assert.assertEquals( 2, msg.get( y ) );
    Assert.assertEquals( msgid, msg.get( _mf__messageId ) );
   
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.Message.checkType()

      -122, // INT (value)
      59, -102, -54, 0,
      -127 // NONE
    };
    msg = bytes2msg( buf );
    msg.checkType( add );
    Assert.assertEquals( 3, msg.size() );
    Assert.assertEquals( 1000000000, msg.get( x ) );
    Assert.assertEquals( 2000000000, msg.get( y ) );
    Assert.assertEquals( msgid, msg.get( _mf__messageId ) );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.Message.checkType()

    byte[] bufx = msg2bytes( msg, stringTypeAndField );
//    dump( bufx );
    Message msg2 = bytes2msg( bufx );
   
//    System.out.println( "msg2 = "+msg2 );
    msg2.checkType( mt_foo );
    Assert.assertEquals( 1, msg2.size() );
    Assert.assertTrue( msg.containsKey( mf_x ) );
    Object y = msg2.get( mf_x );
   
    assertEquals( x, y );
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.StructValue.checkType()

  /** */
  @org.junit.Test
  public void test_S1_export()
  {
    StructValue sv = vf.exportCustomValue( new S1( 19, 23, 29 ) );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_S1 );
    assertEquals( 3, sv.size() );
    assertEquals( 19, sv.get( ValueFactoryTest1._mf_x ) );
    assertEquals( 23, sv.get( ValueFactoryTest1._mf_y ) );
    assertEquals( 29, sv.get( ValueFactoryTest1._mf_z ) );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.StructValue.checkType()

    S1 a = new S1( 21, 22, 23 );
    S1 b = new S1( 31, 32, 33 );
    E1 c = E1.A;
   
    StructValue sv = vf.exportCustomValue( new S2( a, b, c ) );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_S2 );
    assertEquals( 3, sv.size() );
   
    assertSame( a, sv.get( ValueFactoryTest1._mf_a ) );
    assertSame( b, sv.get( ValueFactoryTest1._mf_b ) );
    assertSame( c, sv.get( ValueFactoryTest1._mf_c ) );
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.