Package org.allspice.structured.expr

Examples of org.allspice.structured.expr.FieldVarExpr


  public List<String> getImports() {
    return Arrays.asList("org.allspice.structuredtobc.test.*") ;
  }
  public void test0() throws Exception {
    BooleanGetFieldTest obj = makeObject(BooleanGetFieldTest.class,
        new FieldVarExpr("StaticFieldTestClass","boolean_field",null)) ;
    StaticFieldTestClass.boolean_field = true ;
    assertEquals(obj.meth(),true) ;
    StaticFieldTestClass.boolean_field = false ;
    assertEquals(obj.meth(),false) ;
  }
View Full Code Here


  public static interface ByteGetFieldTest {
    public byte meth() ;
  }
  public void test1() throws Exception {
    ByteGetFieldTest obj = makeObject(ByteGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","byte_field",null)) ;
    StaticFieldTestClass.byte_field = 45 ;
    assertEquals(obj.meth(),(byte)45) ;
  }
View Full Code Here

  public static interface ShortGetFieldTest {
    public short meth() ;
  }
  public void test2() throws Exception {
    ShortGetFieldTest obj = makeObject(ShortGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","short_field",null)) ;
    StaticFieldTestClass.short_field = (short)45 ;
    assertEquals(obj.meth(),(short)45) ;
  }
View Full Code Here

  public static interface CharGetFieldTest {
    public char meth() ;
  }
  public void test3() throws Exception {
    CharGetFieldTest obj = makeObject(CharGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","char_field",null)) ;
    StaticFieldTestClass.char_field = (char)45 ;
    assertEquals(obj.meth(),(char)45) ;
  }
View Full Code Here

  public static interface IntGetFieldTest {
    public int meth() ;
  }
  public void test5() throws Exception {
    IntGetFieldTest obj = makeObject(IntGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","int_field",null)) ;
    StaticFieldTestClass.int_field = 5 ;
    assertEquals(obj.meth(),5) ;
  }
View Full Code Here

  public static interface FloatGetFieldTest {
    public float meth() ;
  }
  public void test6() throws Exception {
    FloatGetFieldTest obj = makeObject(FloatGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","float_field",null)) ;
    StaticFieldTestClass.float_field = 5F ;
    assertTrue(obj.meth() == 5F) ;
  }
View Full Code Here

  public static interface LongGetFieldTest {
    public long meth() ;
  }
  public void test7() throws Exception {
    LongGetFieldTest obj = makeObject(LongGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","long_field",null)) ;
    StaticFieldTestClass.long_field = 5L ;
    assertEquals(obj.meth(),5L) ;
  }
View Full Code Here

  public static interface DoubleGetFieldTest {
    public double meth() ;
  }
  public void test8() throws Exception {
    DoubleGetFieldTest obj = makeObject(DoubleGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","double_field",null)) ;
    StaticFieldTestClass.double_field = 5D ;
    assertTrue(obj.meth() == 5D) ;
  }
View Full Code Here

  public static interface ObjectGetFieldTest {
    public Object meth() ;
  }
  public void test9() throws Exception {
    ObjectGetFieldTest obj = makeObject(ObjectGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","obj_field",null)) ;
    StaticFieldTestClass.obj_field = "abc" ;
    assertEquals(obj.meth(),"abc") ;
  }
View Full Code Here

  public static interface ArrGetFieldTest {
    public Object[] meth() ;
  }
  public void test10() throws Exception {
    ObjectGetFieldTest obj = makeObject(ObjectGetFieldTest.class,
        new FieldVarExpr("org.allspice.structuredtobc.test.StaticFieldTestClass","arr_field",null)) ;
    Object[] arr = new Object[5] ;
    StaticFieldTestClass.arr_field = arr ;
    assertEquals(obj.meth(),arr) ;
  }
View Full Code Here

TOP

Related Classes of org.allspice.structured.expr.FieldVarExpr

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.