codegen: correct argument handling
[mate.git] / tests / ArgumentPassing1.java
diff --git a/tests/ArgumentPassing1.java b/tests/ArgumentPassing1.java
new file mode 100644 (file)
index 0000000..7867cfd
--- /dev/null
@@ -0,0 +1,21 @@
+package tests;
+
+public class ArgumentPassing1 {
+       public static void main(String []args) {
+               myadder(23, 4, 0x77); // 0x92
+               noreturn(23, 4, 0x77); // nothing
+               noargs(); // 0x1337
+       }
+
+       public static int myadder(int a, int b, int c) {
+               return a + b + c;
+       }
+
+       public static void noreturn(int a, int b, int c) {
+               return;
+       }
+
+       public static int noargs() {
+               return -0x1337;
+       }
+}