Closed Dagefoerde closed 7 years ago
The latest commit changes a lot but is apparently still insufficient.
Digging a little deeper, I guess that (some of) the remaining issues -- at least within the TestVMBoxing
test class -- should be solved within the current test execution environment of @kralo. Take, for example, @Test TestVMBoxing#testBoolean1()
: Right now, the test fails because the application's assumed return value is typed java.lang.Integer
(value 0), so a ClassCastException occurs:
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
at de.wwu.muggl.test.real.vm.TestVMBoxing.testBoolean1(TestVMBoxing.java:100)
In the execution of regular applications, only integer return values are assumed (System#exit(int)) for the main()
function. In this special case, however, TestVMNormalMethodRunnerHelper#runMethod(...)
runs an arbitrary method with an arbitrary return type. It should therefore take care of converting integer return values into the desired type.
@kralo would you mind checking this? Thanks!
Jan, thanks for your work. I think your argument is correct, I need to to some casting on the methodRunnerHeper side. Done, but still does not solve all issues.
Make integer instructions (especially iload, iload_n) open to integer-compatible types, i.e. bool, char, byte, short (and int). This attempts to fix #41. @kralo, please try reproducing your example.