Mercurial > projects > dstress
changeset 1168:0726ef6a2d54
added basic .outer tests
author | thomask |
---|---|
date | Wed, 04 Oct 2006 06:27:50 +0000 |
parents | add5b6666997 |
children | 50bb906cd5e3 |
files | nocompile/o/outer_01_A.d nocompile/o/outer_01_B.d nocompile/o/outer_01_C.d run/o/outer_01_D.d run/o/outer_01_E.d |
diffstat | 5 files changed, 101 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/outer_01_A.d Wed Oct 04 06:27:50 2006 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.o.outer_01_A; + +class A{ + void* test(){ + return this.outer; + } +} + +int main(){ + A a = new A(); + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/outer_01_B.d Wed Oct 04 06:27:50 2006 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.o.outer_01_B; + +class A{ +} + +int main(){ + A a = new A(); + void* x = a.outer; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/outer_01_C.d Wed Oct 04 06:27:50 2006 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 15 + +module dstress.nocompile.o.outer_01_C; + +class A{ + static class B{ + } + + void* test(){ + B b = new B(); + return b.outer; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/outer_01_D.d Wed Oct 04 06:27:50 2006 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.o.outer_01_D; + +class A{ + class B{ + } + + void test(){ + B b = new B(); + if(!(b.outer is this)){ + assert(0); + } + } +} + +int main(){ + A a = new A(); + a.test(); + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/outer_01_E.d Wed Oct 04 06:27:50 2006 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.o.outer_01_E; + +struct A{ + class B{ + } + + void test(){ + B b = new B(); + if(!(b.outer is this)){ + assert(0); + } + } +} + +int main(){ + A a; + a.test(); + + return 0; +}