ag: erste testfaelle
authorBernhard Urban <lewurm@gmail.com>
Tue, 30 Mar 2010 16:20:21 +0000 (18:20 +0200)
committerBernhard Urban <lewurm@gmail.com>
Tue, 30 Mar 2010 16:20:21 +0000 (18:20 +0200)
ag/lewurm_00.3 [new file with mode: 0644]
ag/lewurm_01.3 [new file with mode: 0644]
ag/lewurm_02.3 [new file with mode: 0644]
ag/lewurm_03.0 [new file with mode: 0644]

diff --git a/ag/lewurm_00.3 b/ag/lewurm_00.3
new file mode 100644 (file)
index 0000000..25e8e2f
--- /dev/null
@@ -0,0 +1,6 @@
+method f(a b c)
+       /* x nicht deklariert */
+       if a < x then
+               c := 0x1;
+       end;
+end;
diff --git a/ag/lewurm_01.3 b/ag/lewurm_01.3
new file mode 100644 (file)
index 0000000..eda05e0
--- /dev/null
@@ -0,0 +1,8 @@
+method f(a b c)
+       if a < b then
+               var x := 0;
+               c := 1;
+       end;
+       /* x ist nicht im scope */
+       x := x - 1;
+end;
diff --git a/ag/lewurm_02.3 b/ag/lewurm_02.3
new file mode 100644 (file)
index 0000000..c5fc09a
--- /dev/null
@@ -0,0 +1,4 @@
+method f(a b c)
+       /* x ist (noch) nicht im scope */
+       var x := x - 1;
+end;
diff --git a/ag/lewurm_03.0 b/ag/lewurm_03.0
new file mode 100644 (file)
index 0000000..1ac988c
--- /dev/null
@@ -0,0 +1,5 @@
+struct a end;
+method f(b c s)
+       /* lesender feldzugriff */
+       var b := c*(s.a - 1);
+end;