Mercurial > projects > dstress
changeset 857:33178712ec71
Anders F B?rklund <afb@algonet.se>
2006-02-19
news:dt8eo8$5ol$1@digitaldaemon.com
author | thomask |
---|---|
date | Sun, 19 Feb 2006 12:26:01 +0000 |
parents | 7b2c5a101190 |
children | 3446efc90696 |
files | run/a/array_initialization_23_A.d run/a/array_initialization_23_B.d run/a/array_initialization_23_C.d |
diffstat | 3 files changed, 96 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/array_initialization_23_A.d Sun Feb 19 12:26:01 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Anders F Börklund <afb@algonet.se> +// @date@ 2006-02-19 +// @uri@ news:dt8eo8$5ol$1@digitaldaemon.com + +module dstress.run.a.array_initialization_23_A; + +int main(){ + float[] a; + a.length = 1; + + if(a[0] <>= 0.0f){ + assert(0); + } + + a[0] = 2.1f; + + a.length = 2; + + if(a[0] != 2.1f){ + assert(0); + } + if(a[1] <>= 0.0f){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/array_initialization_23_B.d Sun Feb 19 12:26:01 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Anders F Börklund <afb@algonet.se> +// @date@ 2006-02-19 +// @uri@ news:dt8eo8$5ol$1@digitaldaemon.com + +module dstress.run.a.array_initialization_23_B; + +int main(){ + double[] a; + a.length = 1; + + if(a[0] <>= 0.0f){ + assert(0); + } + + a[0] = 2.1; + + a.length = 2; + + if(a[0] != 2.1){ + assert(0); + } + if(a[1] <>= 0.0f){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/array_initialization_23_C.d Sun Feb 19 12:26:01 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Anders F Börklund <afb@algonet.se> +// @date@ 2006-02-19 +// @uri@ news:dt8eo8$5ol$1@digitaldaemon.com + +module dstress.run.a.array_initialization_23_C; + +int main(){ + real[] a; + a.length = 1; + + if(a[0] <>= 0.0f){ + assert(0); + } + + a[0] = 2.1L; + + a.length = 2; + + if(a[0] != 2.1L){ + assert(0); + } + if(a[1] <>= 0.0f){ + assert(0); + } + + return 0; +} +