mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 16:04:10 -08:00
C: fix running JUnit tests
This commit is contained in:
parent
3779520389
commit
0b36010a19
|
@ -281,7 +281,7 @@ abstract class TestEntryPointTransformer implements ClassHolderTransformer, TeaV
|
||||||
MethodHolder constructor = new MethodHolder("<init>", testMethod.getSignature());
|
MethodHolder constructor = new MethodHolder("<init>", testMethod.getSignature());
|
||||||
cls.addMethod(constructor);
|
cls.addMethod(constructor);
|
||||||
ProgramEmitter pe = ProgramEmitter.create(constructor, hierarchy);
|
ProgramEmitter pe = ProgramEmitter.create(constructor, hierarchy);
|
||||||
pe.invoke(Object.class, "<init>", void.class);
|
pe.var(0, ValueType.object(cls.getName())).invokeSpecial(Object.class, "<init>");
|
||||||
ValueEmitter self = pe.var(0, ValueType.object(cls.getName()));
|
ValueEmitter self = pe.var(0, ValueType.object(cls.getName()));
|
||||||
for (int i = 0; i < testMethod.parameterCount(); ++i) {
|
for (int i = 0; i < testMethod.parameterCount(); ++i) {
|
||||||
FieldHolder paramField = new FieldHolder("param_" + i);
|
FieldHolder paramField = new FieldHolder("param_" + i);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user