Index: regression/H3110/run.test.xml =================================================================== --- regression/H3110/run.test.xml (revision 0) +++ regression/H3110/run.test.xml (revision 0) @@ -0,0 +1,9 @@ + + + + + + + Index: regression/H3110/FieldTest.java =================================================================== --- regression/H3110/FieldTest.java (revision 0) +++ regression/H3110/FieldTest.java (revision 0) @@ -0,0 +1,50 @@ +package org.apache.harmony.drlvm.tests.regression.H3110; + +import java.lang.reflect.*; +import junit.framework.TestCase; + +public class FieldTest extends TestCase { + + public float amount = .555f; + + public void test_getFloat() throws Exception { + try { + Field floatField = FieldTest.class.getField("amount"); + FieldTest ft = new FieldTest(); + + float fv = floatField.getFloat(ft); + System.out.println("Float.getFloat(): " + amount + " = " + fv); + assertEquals(amount, fv); + } catch (Exception e) { + System.out.println(e.toString()); + assertTrue(false); + } + } + + public void test_get() throws Exception { + try { + Field floatField = FieldTest.class.getField("amount"); + FieldTest ft = new FieldTest(); + + Float fo = (Float) floatField.get(ft); + System.out.println("Float.get(): " + amount + " = " + fo); + assertEquals(amount, fo.floatValue()); + } catch (Exception e) { + System.out.println(e.toString()); + assertTrue(false); + } + } + + public static void main(String agrs[]) { + try { + new FieldTest().test_get(); + } catch (Exception e) { + System.out.println(e.toString()); + } + try { + new FieldTest().test_getFloat(); + } catch (Exception e) { + System.out.println(e.toString()); + } + } +} \ No newline at end of file