codea: multiplikation, less und equal
authorBernhard Urban <lewurm@gmail.com>
Wed, 5 May 2010 17:33:32 +0000 (19:33 +0200)
committerBernhard Urban <lewurm@gmail.com>
Wed, 5 May 2010 17:33:32 +0000 (19:33 +0200)
codea/lewurm_06.0 [new file with mode: 0644]
codea/lewurm_06.call [new file with mode: 0644]
codea/lewurm_07.0 [new file with mode: 0644]
codea/lewurm_07.call [new file with mode: 0644]
codea/lewurm_08.0 [new file with mode: 0644]
codea/lewurm_08.call [new file with mode: 0644]

diff --git a/codea/lewurm_06.0 b/codea/lewurm_06.0
new file mode 100644 (file)
index 0000000..83e538d
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return a - ( b * -1 * a * -1 * b * -1 * -4 );
+end;
diff --git a/codea/lewurm_06.call b/codea/lewurm_06.call
new file mode 100644 (file)
index 0000000..26ffaf9
--- /dev/null
@@ -0,0 +1,2 @@
+long f(long, long, long);
+RET(f(0xCAFEBABE, 20, 10)==-7980);
diff --git a/codea/lewurm_07.0 b/codea/lewurm_07.0
new file mode 100644 (file)
index 0000000..156ef51
--- /dev/null
@@ -0,0 +1,19 @@
+method w(a)
+       return this < a;
+end;
+
+method x()
+       return this < 3;
+end;
+
+method y()
+       return 3 < this;
+end;
+
+method z()
+       return 3 < 3;
+end;
+
+method override()
+       return 0x55555;
+end;
diff --git a/codea/lewurm_07.call b/codea/lewurm_07.call
new file mode 100644 (file)
index 0000000..5df2bd6
--- /dev/null
@@ -0,0 +1,7 @@
+long w(long,long);
+long x(long);
+long y(long);
+long z(long);
+long override(long);
+
+RET(w(20,30)==1 && override(0x1)==0x55555 && w(30,20)==0 && override(1)==0x55555 && x(400)==0 && override(0x1)==0x55555 && y(400)==1 && override(0x1)==0x55555 && z(400)==0 && override(0x1)==0x55555);
diff --git a/codea/lewurm_08.0 b/codea/lewurm_08.0
new file mode 100644 (file)
index 0000000..69e5dd9
--- /dev/null
@@ -0,0 +1,19 @@
+method w(a)
+       return this = a;
+end;
+
+method x()
+       return this = 3;
+end;
+
+method y()
+       return 3 = this;
+end;
+
+method z()
+       return -13 = -13;
+end;
+
+method override()
+       return 0x55555;
+end;
diff --git a/codea/lewurm_08.call b/codea/lewurm_08.call
new file mode 100644 (file)
index 0000000..e1de119
--- /dev/null
@@ -0,0 +1,7 @@
+long w(long,long);
+long x(long);
+long y(long);
+long z(long);
+long override(long);
+
+RET(w(30,30)==1 && override(0x1)==0x55555 && w(30,20)==0 && override(1)==0x55555 && x(400)==0 && override(0x1)==0x55555 && y(3)==1 && override(0x1)==0x55555 && z(400)==1 && override(0x1)==0x55555);