From: Bernhard Urban Date: Sun, 6 Jun 2010 19:08:50 +0000 (+0200) Subject: gesamt: erste (brauchbare) testfaelle X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=testub10.git;a=commitdiff_plain;h=50c9f57a2e15a7a018e1bd27392f81914898cdc5 gesamt: erste (brauchbare) testfaelle --- diff --git a/gesamt/georg_fib_101.instr b/gesamt/georg_fib_101.instr new file mode 100644 index 0000000..bb06e56 --- /dev/null +++ b/gesamt/georg_fib_101.instr @@ -0,0 +1 @@ +4134 diff --git a/gesamt/georg_fib_102.instr b/gesamt/georg_fib_102.instr new file mode 100644 index 0000000..bb06e56 --- /dev/null +++ b/gesamt/georg_fib_102.instr @@ -0,0 +1 @@ +4134 diff --git a/gesamt/georg_fib_121.instr b/gesamt/georg_fib_121.instr new file mode 100644 index 0000000..7b690e2 --- /dev/null +++ b/gesamt/georg_fib_121.instr @@ -0,0 +1 @@ +4574 diff --git a/gesamt/georg_fib_122.instr b/gesamt/georg_fib_122.instr new file mode 100644 index 0000000..7b690e2 --- /dev/null +++ b/gesamt/georg_fib_122.instr @@ -0,0 +1 @@ +4574 diff --git a/gesamt/lewurm_00.0 b/gesamt/lewurm_00.0 new file mode 100644 index 0000000..dc9b91c --- /dev/null +++ b/gesamt/lewurm_00.0 @@ -0,0 +1,8 @@ +method f() + var x := g(); + return x; +end; + +method g() + return 4; +end; diff --git a/gesamt/lewurm_00.call b/gesamt/lewurm_00.call new file mode 100644 index 0000000..ab3151c --- /dev/null +++ b/gesamt/lewurm_00.call @@ -0,0 +1,4 @@ +long f(long); +long g(long); + +RET(f(0xdead) == 4); diff --git a/gesamt/lewurm_00.instr b/gesamt/lewurm_00.instr new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/gesamt/lewurm_00.instr @@ -0,0 +1 @@ +11 diff --git a/gesamt/lewurm_01.0 b/gesamt/lewurm_01.0 new file mode 100644 index 0000000..2e59564 --- /dev/null +++ b/gesamt/lewurm_01.0 @@ -0,0 +1,8 @@ +method f(a) + return (g(a*5) - (0-this)); +end; + +method g(b) + b := (0-b) - 100; + return this-b; +end; diff --git a/gesamt/lewurm_01.call b/gesamt/lewurm_01.call new file mode 100644 index 0000000..1338646 --- /dev/null +++ b/gesamt/lewurm_01.call @@ -0,0 +1,6 @@ +long f(long,long); +long g(long,long); +#define ERG 320 +int ret = f(100,4); +printf("ret ist %i (sollte %i sein)\n", ret, ERG); +RET(ret == ERG); diff --git a/gesamt/lewurm_01.instr b/gesamt/lewurm_01.instr new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/gesamt/lewurm_01.instr @@ -0,0 +1 @@ +24 diff --git a/gesamt/lewurm_02.0 b/gesamt/lewurm_02.0 new file mode 100644 index 0000000..25eb517 --- /dev/null +++ b/gesamt/lewurm_02.0 @@ -0,0 +1,13 @@ +method f(a) + var x := a--100; + var y := g(x); + y := y - 100 - (0-x); + return y; +end; + +method g(b) + var x := 1; + var y := 2; + var z := -3; + return b-x-y-z; +end; diff --git a/gesamt/lewurm_02.call b/gesamt/lewurm_02.call new file mode 100644 index 0000000..cac8445 --- /dev/null +++ b/gesamt/lewurm_02.call @@ -0,0 +1,6 @@ +long f(long,long); +long g(long,long); +#define ERG 200 +int ret = f(0xdead,50); +printf("ret ist %i (sollte %i sein)\n", ret, ERG); +RET(ret == ERG); diff --git a/gesamt/lewurm_02.instr b/gesamt/lewurm_02.instr new file mode 100644 index 0000000..e522732 --- /dev/null +++ b/gesamt/lewurm_02.instr @@ -0,0 +1 @@ +38 diff --git a/gesamt/lewurm_03.0 b/gesamt/lewurm_03.0 new file mode 100644 index 0000000..70fe437 --- /dev/null +++ b/gesamt/lewurm_03.0 @@ -0,0 +1,7 @@ +method f() + return (this-50).g(); +end; + +method g() + return this--50; +end; diff --git a/gesamt/lewurm_03.call b/gesamt/lewurm_03.call new file mode 100644 index 0000000..89df9ac --- /dev/null +++ b/gesamt/lewurm_03.call @@ -0,0 +1,6 @@ +long f(long); +long g(long); +#define ERG 320 +int ret = f(ERG); +printf("ret ist %i (sollte %i sein)\n", ret, ERG); +RET(ret == ERG); diff --git a/gesamt/lewurm_03.instr b/gesamt/lewurm_03.instr new file mode 100644 index 0000000..8351c19 --- /dev/null +++ b/gesamt/lewurm_03.instr @@ -0,0 +1 @@ +14 diff --git a/gesamt/lewurm_04.0 b/gesamt/lewurm_04.0 new file mode 100644 index 0000000..16d1dda --- /dev/null +++ b/gesamt/lewurm_04.0 @@ -0,0 +1,7 @@ +method f() + return (this-1).g()-(this-2).g()-g(); +end; + +method g() + return this; +end; diff --git a/gesamt/lewurm_04.call b/gesamt/lewurm_04.call new file mode 100644 index 0000000..cfed53a --- /dev/null +++ b/gesamt/lewurm_04.call @@ -0,0 +1,10 @@ +long f(long); +long g(long); +#define ERG(a) ((a-1)-(a-2)-a) +int ret1 = f(-10); +int ret2 = f(1337); +int ret3 = f(-358193); +printf("ret1 ist %6i (sollte %6i sein)\n", ret1, ERG(-10)); +printf("ret2 ist %6i (sollte %6i sein)\n", ret2, ERG(1337)); +printf("ret3 ist %6i (sollte %6i sein)\n", ret3, ERG(-358193)); +RET(ret1 == ERG(-10) && ret2 == ERG(1337) && ret3 == ERG(-358193)); diff --git a/gesamt/lewurm_04.instr b/gesamt/lewurm_04.instr new file mode 100644 index 0000000..5bc6609 --- /dev/null +++ b/gesamt/lewurm_04.instr @@ -0,0 +1 @@ +117