Mercurial > projects > dstress
changeset 873:a309b14fcc64
Sean Kelly <sean@f4.ca>
2006-02-24
news:dtnn0o$b5q$1@digitaldaemon.com
author | thomask |
---|---|
date | Wed, 01 Mar 2006 18:06:31 +0000 |
parents | 4b3b621bc44b |
children | 47f2c595b3b6 |
files | run/m/mixin_17_A.d run/m/mixin_17_B.d run/m/mixin_17_C.d run/m/mixin_17_D.d run/m/mixin_17_E.d run/m/mixin_17_F.d |
diffstat | 6 files changed, 246 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_17_A.d Wed Mar 01 18:06:31 2006 +0000 @@ -0,0 +1,33 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-24 +// @uri@ news:dtnn0o$b5q$1@digitaldaemon.com + +module dstress.run.m.mixin_17_A; + +int status; + +template mix(){ + int i; + + void test(){ + status = i; + } +} + +int main(){ + assert(status == 0); + + mixin mix!(); + + test(); + + if(status != 0){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_17_B.d Wed Mar 01 18:06:31 2006 +0000 @@ -0,0 +1,37 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-24 +// @uri@ news:dtnn0o$b5q$1@digitaldaemon.com + +module dstress.run.m.mixin_17_B; + +int status; + +template mix(){ + int i; + + void test(){ + status = i; + } +} + +int main(){ + assert(status == 0); + + mixin mix!(); + + test(); + + if(status != 0){ + assert(0); + } + + if(i != 0){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_17_C.d Wed Mar 01 18:06:31 2006 +0000 @@ -0,0 +1,37 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-24 +// @uri@ news:dtnn0o$b5q$1@digitaldaemon.com + +module dstress.run.m.mixin_17_C; + +int status; + +void dummy(int i){ + status = i; +} + +template mix(){ + int i; + + void test(){ + dummy(i); + } +} + +int main(){ + assert(status == 0); + + mixin mix!(); + + test(); + + if(status != 0){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_17_D.d Wed Mar 01 18:06:31 2006 +0000 @@ -0,0 +1,50 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-24 +// @uri@ news:dtnn0o$b5q$1@digitaldaemon.com + +// @WARNING@ direct use of Phobos + +module dstress.run.m.mixin_17_D; + +import std.stdarg; + +int status; + +void dummy(...){ + if(_arguments.length != 1){ + assert(0); + } + status = va_arg!(int)(_argptr);; +} + +template mix(){ + int i; + + void test(){ + dummy(i); + } +} + +int main(){ + assert(status == 0); + + mixin mix!(); + + test(); + + if(status != 0){ + assert(0); + } + + test(); + + if(status != 0){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_17_E.d Wed Mar 01 18:06:31 2006 +0000 @@ -0,0 +1,41 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-24 +// @uri@ news:dtnn0o$b5q$1@digitaldaemon.com + +module dstress.run.m.mixin_17_E; + +int status; + +void dummy(int i){ + status = i; +} + +template mix(){ + int i; + + void test(){ + dummy(i++); + } +} + +int main(){ + assert(status == 0); + + mixin mix!(); + + test(); + + if(status != 0){ + assert(0); + } + + if(i != 1){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_17_F.d Wed Mar 01 18:06:31 2006 +0000 @@ -0,0 +1,48 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2006-02-24 +// @uri@ news:dtnn0o$b5q$1@digitaldaemon.com + +// @WARNING@ direct use of Phobos + +module dstress.run.m.mixin_17_F; + +import std.stdarg; + +int status; + +void dummy(...){ + if(_arguments.length != 1){ + assert(0); + } + status = va_arg!(int)(_argptr);; +} + +template mix(){ + int i; + + void test(){ + dummy(i++); + } +} + +int main(){ + assert(status == 0); + + mixin mix!(); + + test(); + + if(status != 0){ + assert(0); + } + + if(i != 1){ + assert(0); + } + + return 0; +}