codea: felder und not testfaelle
authorBernhard Urban <lewurm@gmail.com>
Wed, 5 May 2010 22:48:32 +0000 (00:48 +0200)
committerBernhard Urban <lewurm@gmail.com>
Wed, 5 May 2010 22:48:32 +0000 (00:48 +0200)
codea/lewurm_09.0 [new file with mode: 0644]
codea/lewurm_09.call [new file with mode: 0644]
codea/lewurm_10.0 [new file with mode: 0644]
codea/lewurm_10.call [new file with mode: 0644]

diff --git a/codea/lewurm_09.0 b/codea/lewurm_09.0
new file mode 100644 (file)
index 0000000..b42b238
--- /dev/null
@@ -0,0 +1,12 @@
+struct j k l end;
+method w()
+       return this.k;
+end;
+
+method x()
+       return l;
+end;
+
+method y()
+       return (this-8).k;
+end;
diff --git a/codea/lewurm_09.call b/codea/lewurm_09.call
new file mode 100644 (file)
index 0000000..c16667e
--- /dev/null
@@ -0,0 +1,6 @@
+long w(long);
+long x(long);
+long y(long);
+
+long t[3] = {5,6,7};
+RET(w((long)t)==6 && x((long)t)==7 && y((long)t)==5);
diff --git a/codea/lewurm_10.0 b/codea/lewurm_10.0
new file mode 100644 (file)
index 0000000..b8ed559
--- /dev/null
@@ -0,0 +1,11 @@
+method w()
+       return not this;
+end;
+
+method x()
+       return not (not this);
+end;
+
+method y()
+       return not (not (not this));
+end;
diff --git a/codea/lewurm_10.call b/codea/lewurm_10.call
new file mode 100644 (file)
index 0000000..fff444f
--- /dev/null
@@ -0,0 +1,5 @@
+long w(long);
+long x(long);
+long y(long);
+
+RET(w(0)==1 && x(0)==0 && y(1)==0);