Signed-off-by: Tomek Grabiec <[email protected]>
---
Makefile | 3 +-
regression/jvm/InvokeResultTest.j | 89 +++++++++++++++++++++++++++++++++++++
regression/run-suite.sh | 1 +
3 files changed, 92 insertions(+), 1 deletions(-)
create mode 100644 regression/jvm/InvokeResultTest.j
diff --git a/Makefile b/Makefile
index 2ad7687..e371db6 100644
--- a/Makefile
+++ b/Makefile
@@ -303,7 +303,8 @@ JASMIN_REGRESSION_TEST_SUITE_CLASSES = \
regression/jvm/DupTest.j \
regression/jvm/PopTest.j \
regression/jvm/SubroutineTest.j \
- regression/jvm/WideTest.j
+ regression/jvm/WideTest.j \
+ regression/jvm/InvokeResultTest.j
java-regression: FORCE
$(E) " JAVAC " $(REGRESSION_TEST_SUITE_CLASSES)
diff --git a/regression/jvm/InvokeResultTest.j
b/regression/jvm/InvokeResultTest.j
new file mode 100644
index 0000000..8132fcd
--- /dev/null
+++ b/regression/jvm/InvokeResultTest.j
@@ -0,0 +1,89 @@
+.class public jvm/InvokeResultTest
+.super jvm/TestCase
+
+.method public static byteMethod()B
+ .limit stack 1
+ .limit locals 0
+
+ bipush -77
+ ireturn
+.end method
+
+.method public static shortMethod()S
+ .limit stack 1
+ .limit locals 0
+
+ sipush -7777
+ ireturn
+.end method
+
+.method public static charMethod()C
+ .limit stack 1
+ .limit locals 1
+
+ ldc 65535
+ ireturn
+.end method
+
+.method public static booleanMethod()Z
+ .limit stack 1
+ .limit locals 0
+
+ bipush 1
+ ireturn
+.end method
+
+.method public static testByteResult()V
+ .limit stack 2
+ .limit locals 0
+
+ bipush -77
+ invokestatic jvm/InvokeResultTest/byteMethod()B
+ i2s
+ invokestatic jvm/TestCase/assertEquals(II)V
+ return
+.end method
+
+.method public static testShortResult()V
+ .limit stack 2
+ .limit locals 0
+
+ sipush -7777
+ invokestatic jvm/InvokeResultTest/shortMethod()S
+ i2s
+ invokestatic jvm/TestCase/assertEquals(II)V
+ return
+.end method
+
+.method public static testCharResult()V
+ .limit stack 2
+ .limit locals 0
+
+ ldc 65535
+ invokestatic jvm/InvokeResultTest/charMethod()C
+ i2c
+ invokestatic jvm/TestCase/assertEquals(II)V
+ return
+.end method
+
+.method public static testBooleanResult()V
+ .limit stack 2
+ .limit locals 0
+
+ bipush 1
+ invokestatic jvm/InvokeResultTest/booleanMethod()Z
+ i2s
+ invokestatic jvm/TestCase/assertEquals(II)V
+ return
+.end method
+
+.method public static main([Ljava/lang/String;)V
+ .limit stack 1
+ .limit locals 1
+
+ invokestatic jvm/InvokeResultTest/testByteResult()V
+ invokestatic jvm/InvokeResultTest/testBooleanResult()V
+ invokestatic jvm/InvokeResultTest/testCharResult()V
+ invokestatic jvm/InvokeResultTest/testShortResult()V
+ return
+.end method
diff --git a/regression/run-suite.sh b/regression/run-suite.sh
index e8cbfe0..f28f794 100755
--- a/regression/run-suite.sh
+++ b/regression/run-suite.sh
@@ -71,6 +71,7 @@ if [ -z "$CLASS_LIST" ]; then
run_java jvm.InterfaceInheritanceTest 0
run_java jvm.InvokeinterfaceTest 0
run_java jvm.InvokestaticPatchingTest 0
+ run_java jvm.InvokeResultTest 0
run_java jvm.LoadConstantsTest 0
run_java jvm.LongArithmeticExceptionsTest 0
run_java jvm.LongArithmeticTest 0
--
1.6.0.6
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel