forked from JavaTX/JavaCompilerCore
Inherit Test update
This commit is contained in:
parent
60b182b9b1
commit
a0a813f87c
@ -143,7 +143,7 @@ public class InheritTest {
|
|||||||
classToTest = loader.loadClass("Inherit");
|
classToTest = loader.loadClass("Inherit");
|
||||||
Method m = classToTestAA.getDeclaredMethod("m", Integer.class);
|
Method m = classToTestAA.getDeclaredMethod("m", Integer.class);
|
||||||
assertEquals(m.invoke(instanceOfClassAA, 5), "AA");
|
assertEquals(m.invoke(instanceOfClassAA, 5), "AA");
|
||||||
classToTestAA = classToTest.getField("aafield").getType();
|
classToTestAA = classToTest.getDeclaredField("aafield").getType();
|
||||||
Method main = classToTest.getDeclaredMethod("main", classToTestAA, Integer.class);
|
Method main = classToTest.getDeclaredMethod("main", classToTestAA, Integer.class);
|
||||||
assertEquals(main.invoke(instanceOfClass, instanceOfClassAA, 5), "AA");
|
assertEquals(main.invoke(instanceOfClass, instanceOfClassAA, 5), "AA");
|
||||||
}
|
}
|
||||||
|
@ -6,14 +6,14 @@ import java.lang.String;
|
|||||||
|
|
||||||
public class Inherit {
|
public class Inherit {
|
||||||
|
|
||||||
AA aafield;
|
AA aafield;
|
||||||
//m(Integer i) { return "AA"; }
|
//m(Integer i) { return "AA"; }
|
||||||
|
|
||||||
main(d, i) {
|
main2(d, i) {
|
||||||
return d.m(i);
|
return d.m(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
main(v, i) {
|
main2(v, i) {
|
||||||
var aa = v.elementAt(0);
|
var aa = v.elementAt(0);
|
||||||
return aa.m(i);
|
return aa.m(i);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user