Added tests for integer arithmetics
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 10 Aug 2016 07:37:08 +0100
changeset 41 41896fd2e6bf
parent 40 db109f6d35bd
child 42 bf88eac661c4
Added tests for integer arithmetics
c1/tests/DragonFly__C1CompilerJavaTests.st
c1/tests/java/src/jv/dragonfly/c1/tests/C1CompilerJavaTests.java
--- a/c1/tests/DragonFly__C1CompilerJavaTests.st	Tue Aug 09 23:47:56 2016 +0100
+++ b/c1/tests/DragonFly__C1CompilerJavaTests.st	Wed Aug 10 07:37:08 2016 +0100
@@ -63,6 +63,17 @@
     self assert: (cls new m02a:15) == 15.
 
     "Created: / 09-08-2016 / 09:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_m03a
+    | cls |
+
+    cls := JAVA jv dragonfly c1 tests C1CompilerJavaTests.
+
+    self compile: #'m03a(II)I' in: cls.
+    self assert: (cls new m03a:1 _:2) == 3.
+
+    "Created: / 09-08-2016 / 23:49:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !C1CompilerJavaTests methodsFor:'utilities'!
--- a/c1/tests/java/src/jv/dragonfly/c1/tests/C1CompilerJavaTests.java	Tue Aug 09 23:47:56 2016 +0100
+++ b/c1/tests/java/src/jv/dragonfly/c1/tests/C1CompilerJavaTests.java	Wed Aug 10 07:37:08 2016 +0100
@@ -16,4 +16,8 @@
         return a;
     }
 
+    public int m03a(int a, int b) {
+        return a + b;
+    }
+
 }