From: Bernhard Urban Date: Wed, 5 May 2010 22:48:32 +0000 (+0200) Subject: codea: felder und not testfaelle X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=testub10.git;a=commitdiff_plain;h=2c4da31bd874b678fbbdf0f78afe709b82a964f8;ds=sidebyside codea: felder und not testfaelle --- diff --git a/codea/lewurm_09.0 b/codea/lewurm_09.0 new file mode 100644 index 0000000..b42b238 --- /dev/null +++ b/codea/lewurm_09.0 @@ -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 index 0000000..c16667e --- /dev/null +++ b/codea/lewurm_09.call @@ -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 index 0000000..b8ed559 --- /dev/null +++ b/codea/lewurm_10.0 @@ -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 index 0000000..fff444f --- /dev/null +++ b/codea/lewurm_10.call @@ -0,0 +1,5 @@ +long w(long); +long x(long); +long y(long); + +RET(w(0)==1 && x(0)==0 && y(1)==0);