Mercurial > projects > dstress
changeset 868:6e76e9fe130b
C++ porting
author | thomask |
---|---|
date | Sat, 25 Feb 2006 08:05:53 +0000 |
parents | c92a271361be |
children | 899e2a9d39f1 |
files | nocompile/a/array_initialization_24.d nocompile/e/extern_09.d nocompile/s/scope_03_C.d nocompile/s/scope_03_D.d nocompile/s/scope_03_E.d nocompile/s/scope_03_F.d nocompile/s/scope_04.d nocompile/t/typedef_12.d run/s/scope_03_A.d run/s/scope_03_B.d |
diffstat | 10 files changed, 186 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/array_initialization_24.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,11 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.a.array_initialization_24; + +char* arg[] = { "abc", "12" };
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/e/extern_09.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 12 + +module dstress.nocompile.e.extern_09; + +extern int x; +extern int x;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/scope_03_C.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.s.scope_03_C; + + +void main(){ + static assert(.x); + + const int x = 2; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/scope_03_D.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 13 + +module dstress.nocompile.s.scope_03_D; + + +void main(){ + const int x = 2; + + static assert(.x); +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/scope_03_E.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.s.scope_03_E; + + +void main(){ + const int x = 2; + + { + const int x = 3; + + static assert(.x); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/scope_03_F.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.s.scope_03_F; + + +void main(){ + int x = 2; + + { + int x = 3; + + assert(.x); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/scope_04.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.s.scope_04; + +int x = 1; + +void main(){ + int x = 2; + + ::x = 3; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/typedef_12.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 12 + +module dstress.nocompile.t.typedef_12; + +typedef int x; +typedef int x;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/scope_03_A.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,37 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.s.scope_03_A; + +int x; + +int main(){ + x = 1; + + int x; + x = 2; + + { + int x; + x = 3; + + if(.x != 1){ + assert(0); + } + if(x != 3){ + assert(0); + } + } + + if(.x != 1){ + assert(0); + } + + if(x != 2){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/scope_03_B.d Sat Feb 25 08:05:53 2006 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.s.scope_03_B; + +const int x = 1; + +int main(){ + static assert(x == 1); + static assert(.x == 1); + + const int x = 2; + static assert(x == 2); + static assert(.x == 1); + + { + const int x = 3; + static assert(x == 3); + static assert(.x == 1); + } + + static assert(x == 2); + static assert(.x == 1); + + return 0; +} +