Added codeb testcase
authorSnafu <stuff@c-gabriel.at>
Sun, 9 May 2010 21:12:26 +0000 (23:12 +0200)
committerSnafu <stuff@c-gabriel.at>
Sun, 9 May 2010 21:12:26 +0000 (23:12 +0200)
codeb/snafu_01.0 [new file with mode: 0644]
codeb/snafu_01.call [new file with mode: 0644]
codeb/snafu_01.instr [new file with mode: 0644]

diff --git a/codeb/snafu_01.0 b/codeb/snafu_01.0
new file mode 100644 (file)
index 0000000..62aa2c9
--- /dev/null
@@ -0,0 +1,16 @@
+method q(x y)
+       var foo := 42;
+       return 5 - ((x - 3) - y);
+end;
+
+method r(x y)
+       var bar := x*y;
+       return (x - y) - 10;
+end;
+
+struct goo gaa gee end;
+
+method s(x y)
+       var foobar := (x.gaa * y.goo) - ((2*x) - y).gee;
+       return (x - 1);
+end;
diff --git a/codeb/snafu_01.call b/codeb/snafu_01.call
new file mode 100644 (file)
index 0000000..15dec83
--- /dev/null
@@ -0,0 +1,7 @@
+extern long q(long this, long, long);
+extern long r(long this, long, long);
+extern long s(long this, long, long);
+
+long ar[] = {111, 222, 333};
+
+RET((q(0xDEAD, 33, 15) == -10) && (r(0xDEAD, 33, 15) == 8) && (s(0xDEAD, ar, ar) == ((long) ar - 1)));
diff --git a/codeb/snafu_01.instr b/codeb/snafu_01.instr
new file mode 100644 (file)
index 0000000..f599e28
--- /dev/null
@@ -0,0 +1 @@
+10