Package org.allspice.structured.statement

Examples of org.allspice.structured.statement.Statement


  }
  public static interface ObjectSetFieldTest {
    public void meth(FieldTestClass arg0,Object arg1) ;
  }
  public void test9() throws Exception {
    Statement st = new ExprStatement(new SetValueExpr(new FieldVarExpr(ARG0,"obj_field",null),ARG1,null),null) ;
    ObjectSetFieldTest obj = makeObject(ObjectSetFieldTest.class,st,new ReturnStatement(null)) ;
    FieldTestClass o2 = new FieldTestClass() ;
    obj.meth(o2, "abc") ;
    assertEquals(o2.obj_field,"abc") ;
  }
View Full Code Here


  }
  public static interface ArrSetFieldTest {
    public void meth(FieldTestClass arg0,Object[] arg1) ;
  }
  public void test10() throws Exception {
    Statement st = new ExprStatement(new SetValueExpr(new FieldVarExpr(ARG0,"arr_field",null),ARG1,null),null) ;
    ObjectSetFieldTest obj = makeObject(ObjectSetFieldTest.class,st,new ReturnStatement(null)) ;
    Object[] arr = new Object[5] ;
    FieldTestClass o2 = new FieldTestClass() ;
    obj.meth(o2, arr) ;
    assertEquals(o2.arr_field,arr) ;
View Full Code Here

    public void meth(char[] arg0,int arg1,char arg2) ;
    public void meth(byte[] arg0,int arg1,byte arg2) ;
    public void meth(short[] arg0,int arg1,short arg2) ;
  }
  public void test0() throws Exception {
    Statement st = new ExprStatement(new SetValueExpr(new ArrVarExpr(ARG0,ARG1,null),ARG2,null),null) ;
    SetArrTestInt obj = makeObject(SetArrTestInt.class,st,new ReturnStatement(null)) ;
    {
      int[] arr = new int[4] ;
      obj.meth(arr,2,42) ;
      assertTrue(arr[2] == 42) ;
View Full Code Here

TOP

Related Classes of org.allspice.structured.statement.Statement

Copyright © 2018 www.massapicom. 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.