Mercurial > projects > dstress
changeset 935:89f09dbb06b6
Stewart Gordon <smjg_1998@yahoo.com>
2005-12-12
news:dnjnqe$16sv$1@digitaldaemon.com
author | thomask |
---|---|
date | Sun, 26 Mar 2006 12:38:56 +0000 |
parents | 5e597b3bfbca |
children | daeca9f37d08 |
files | nocompile/a/arrayOp_01.d nocompile/i/is_14_A.d nocompile/i/is_14_B.d nocompile/i/is_14_C.d nocompile/i/is_14_D.d nocompile/i/is_14_E.d nocompile/i/is_14_F.d run/a/arrayOp_01.d run/c/const_16_B.d run/o/opSliceAssign_01.d |
diffstat | 10 files changed, 185 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/arrayOp_01.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,16 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.a.arrayOp_01; + +void main() { + static int[] x = [ 3, 4, 6 ]; + int[] z = x[] + 8; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/is_14_A.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,16 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.i.is_14_A; + +void main(){ + static if(is(x()){ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/is_14_B.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.i.is_14_B; + +void main(){ + int x; + + static if(is(x()){ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/is_14_C.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 18 + +module dstress.nocompile.i.is_14_C; + +int x(){ + return 0; +} + +void main(){ + static if(is(x()){ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/is_14_D.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 18 + +module dstress.nocompile.i.is_14_D; + +template x(){ + int x; +} + +void main(){ + static if(is(x()){ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/is_14_E.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 18 + +module dstress.nocompile.i.is_14_E; + +class x(){ + int x; +} + +void main(){ + static if(is(x()){ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/is_14_F.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 18 + +module dstress.nocompile.i.is_14_F; + +struct x(){ + int x; +} + +void main(){ + static if(is(x()){ + } +}
--- a/run/a/arrayOp_01.d Sun Mar 26 10:22:58 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Stewart Gordon <smjg_1998@yahoo.com> -// @date@ 2005-12-12 -// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com - -// Although Walter claimed in one newsgroup post that he was going to abandon -// implementing array ops for 1.0, the feature is still in all its glory in -// the spec. - -module dstress.run.a.arrayOp_01; - -int[] x = [ 3, 4, 6 ]; - -int main() { - int[] z = x[] + 8; - - assert (z[0] == 11); - assert (z[1] == 12); - assert (z[2] == 14); - - return 0; -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/const_16_B.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-03-21 +// @uri@ news:d1mc4q$2peg$3@digitaldaemon.com + +module dstress.run.c.const_16_B; + +struct StructA{ + int a; +} + +const StructA s = { 1 }; +const int x = s.a + 1; + +int main(){ + assert(s1.a == 1); + assert(x == 2); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opSliceAssign_01.d Sun Mar 26 12:38:56 2006 +0000 @@ -0,0 +1,33 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-12-12 +// @uri@ news:dnjnqe$16sv$1@digitaldaemon.com + +module dstress.run.o.opSliceAssign_01; + +int main() { + int[] piece = new int[6]; + int[] item; + + item = piece[2..5] = 3; + assert (item is piece[2..5]); + + piece[3] = 5; + + assert (piece[0] == 0); + assert (piece[1] == 0); + assert (piece[2] == 3); + assert (piece[3] == 5); + assert (piece[4] == 3); + assert (piece[5] == 0); + assert (item.length == 3); + + assert (item[0] == 3); + assert (item[1] == 5); + assert (item[2] == 3); + + return 0; +}