Eigene Testfaelle. lewurm_01.call und lewurm_02.call ausgebessert.
authorSnafu <stuff@c-gabriel.at>
Sun, 2 May 2010 21:06:21 +0000 (23:06 +0200)
committerSnafu <stuff@c-gabriel.at>
Sun, 2 May 2010 21:06:21 +0000 (23:06 +0200)
codea/lewurm_01.call
codea/lewurm_02.call
codea/snafu_00.0 [new file with mode: 0644]
codea/snafu_00.call [new file with mode: 0644]
codea/snafu_01.0 [new file with mode: 0644]
codea/snafu_01.call [new file with mode: 0644]
codea/snafu_02.0 [new file with mode: 0644]
codea/snafu_02.call [new file with mode: 0644]

index 57a0ec6ee4b219907f1dc975606a0eae0bf323b8..448486438bda30d085145321e8669836989a1577 100644 (file)
@@ -1,2 +1,2 @@
-extern long f(long);
-RET(f(5)==5);
+extern long f(long, long);
+RET(f(0xDEAD, 5)==5);
index 2861bb06817f345af7597b74ee30a6df2209b5f4..84fad81f529f214fddc68600d3863168478bce76 100644 (file)
@@ -1,2 +1,2 @@
-extern long f(long);
-RET(f(-3)==-3);
+extern long f(long, long);
+RET(f(0xDEAD, -3)==-3);
diff --git a/codea/snafu_00.0 b/codea/snafu_00.0
new file mode 100644 (file)
index 0000000..3806e12
--- /dev/null
@@ -0,0 +1,11 @@
+method foo(a b c)
+       return a;
+end;
+
+method bar(a b c)
+       return b;
+end;
+
+method foobar(a b c)
+       return c;
+end;
diff --git a/codea/snafu_00.call b/codea/snafu_00.call
new file mode 100644 (file)
index 0000000..000b197
--- /dev/null
@@ -0,0 +1,5 @@
+extern long foo(long this, long, long, long);
+extern long bar(long this, long, long, long);
+extern long foobar(long this, long, long, long);
+
+RET( (foo(0xDEAD, 3, 4, 5) == 3) && (bar(0xDEAD, 3, 4, 5) == 4) && (foobar(0xDEAD, 3, 4, 5) == 5));
diff --git a/codea/snafu_01.0 b/codea/snafu_01.0
new file mode 100644 (file)
index 0000000..3383891
--- /dev/null
@@ -0,0 +1,11 @@
+method a()
+       return 5 - 3;
+end;
+
+method b(x)
+       return 5 - x;
+end;
+
+method c(x)
+       return x - 3;
+end;
diff --git a/codea/snafu_01.call b/codea/snafu_01.call
new file mode 100644 (file)
index 0000000..06d5289
--- /dev/null
@@ -0,0 +1,5 @@
+extern long a(long this);
+extern long b(long this, long x);
+extern long c(long this, long x);
+
+RET( (a(0xDEAD) == 2) && (b(0xDEAD, 23) == -18) && (c(0xDEAD, 23) == 20));
diff --git a/codea/snafu_02.0 b/codea/snafu_02.0
new file mode 100644 (file)
index 0000000..7871f2e
--- /dev/null
@@ -0,0 +1,7 @@
+method q(x y)
+       return 5 - ((x - 3) - y);
+end;
+
+method r(x y)
+       return (x - y) - 10;
+end;
diff --git a/codea/snafu_02.call b/codea/snafu_02.call
new file mode 100644 (file)
index 0000000..4e9d749
--- /dev/null
@@ -0,0 +1,4 @@
+extern long q(long this, long, long);
+extern long r(long this, long, long);
+
+RET((q(0xDEAD, 33, 15) == -10) && (r(0xDEAD, 33, 15) == 8));