From 0b36010a191206d4070c88656f54d8ed1690c666 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 18 Mar 2021 01:03:19 +0300 Subject: [PATCH] C: fix running JUnit tests --- .../main/java/org/teavm/junit/TestEntryPointTransformer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/junit/src/main/java/org/teavm/junit/TestEntryPointTransformer.java b/tools/junit/src/main/java/org/teavm/junit/TestEntryPointTransformer.java index 6ed01da7f..dfe1a7b9e 100644 --- a/tools/junit/src/main/java/org/teavm/junit/TestEntryPointTransformer.java +++ b/tools/junit/src/main/java/org/teavm/junit/TestEntryPointTransformer.java @@ -281,7 +281,7 @@ abstract class TestEntryPointTransformer implements ClassHolderTransformer, TeaV MethodHolder constructor = new MethodHolder("", testMethod.getSignature()); cls.addMethod(constructor); ProgramEmitter pe = ProgramEmitter.create(constructor, hierarchy); - pe.invoke(Object.class, "", void.class); + pe.var(0, ValueType.object(cls.getName())).invokeSpecial(Object.class, ""); ValueEmitter self = pe.var(0, ValueType.object(cls.getName())); for (int i = 0; i < testMethod.parameterCount(); ++i) { FieldHolder paramField = new FieldHolder("param_" + i);