Mercurial > projects > dstress
changeset 919:4ed1f9f14948
<oskar.linde@gmail.com>
2005-03-16
news:dvbst8$4ml$1@digitaldaemon.com
author | thomask |
---|---|
date | Sun, 19 Mar 2006 07:38:45 +0000 |
parents | d3f836c7c9e6 |
children | 5511f9277078 |
files | run/t/typeof_08_A.d run/t/typeof_08_B.d run/t/typeof_08_C.d run/t/typeof_08_D.d |
diffstat | 4 files changed, 104 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_08_A.d Sun Mar 19 07:38:45 2006 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2005-03-16 +// @uri@ news:dvbst8$4ml$1@digitaldaemon.com + +module dstress.run.t.typeof_08_A; + +template declare(X){ + X declare; +} + +typeof(declare!(typeof(""w))[0 .. length]) y; + +int main(){ + static if(!is(typeof(y) == wchar[])){ + static assert(0); + } + + if(y.length != 0){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_08_B.d Sun Mar 19 07:38:45 2006 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2005-03-16 +// @uri@ news:dvbst8$4ml$1@digitaldaemon.com + +module dstress.run.t.typeof_08_B; + +template declare(X){ + X declare; +} + +typeof(declare!(typeof("abc"w))[0 .. length]) y; + +int main(){ + static if(!is(typeof(y) == wchar[])){ + static assert(0); + } + + if(y.length != 0){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_08_C.d Sun Mar 19 07:38:45 2006 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2005-03-16 +// @uri@ news:dvbst8$4ml$1@digitaldaemon.com + +module dstress.run.t.typeof_08_C; + +typeof("abc"w) y; + +int main(){ + static if(!is(typeof(y) == wchar[])){ + static assert(0); + } + + if(y.length != 0){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_08_D.d Sun Mar 19 07:38:45 2006 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2005-03-16 +// @uri@ news:dvbst8$4ml$1@digitaldaemon.com + +module dstress.run.t.typeof_08_D; + +typeof("") y; + +int main(){ + static if(!is(typeof(y) == wchar[])){ + static assert(0); + } + + if(y.length != 0){ + assert(0); + } + + return 0; +} +