# HG changeset patch # User thomask # Date 1118470048 0 # Node ID 893c2d75daf46996efdc97ab213243c0f4bfc7b5 # Parent 36e896c73c8ac29f5c5f17a2150d48a3e07df5df basic static if testing diff -r 36e896c73c8a -r 893c2d75daf4 run/s/static_if_04_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_if_04_A.d Sat Jun 11 06:07:28 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dtsress.run.s.static_if_04_A; + +int main(){ + const int i = 1; + + static if(i==1){ + return 0; + }else{ + static assert(0); + } +} diff -r 36e896c73c8a -r 893c2d75daf4 run/s/static_if_04_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_if_04_B.d Sat Jun 11 06:07:28 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dtsress.run.s.static_if_04_D; + +const int i = 1; + +int main(){ + static if(i==2){ + static assert(0); + }else{ + return 0; + } +} diff -r 36e896c73c8a -r 893c2d75daf4 run/s/static_if_04_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_if_04_C.d Sat Jun 11 06:07:28 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dtsress.run.s.static_if_04_C; + +const int i = 1; + +int main(){ + static if(i==1){ + return 0; + }else{ + static assert(0); + } +} diff -r 36e896c73c8a -r 893c2d75daf4 run/s/static_if_04_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_if_04_D.d Sat Jun 11 06:07:28 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dtsress.run.s.static_if_04_B; + +int main(){ + const int i = 1; + + static if(i==2){ + static assert(0); + }else{ + return 0; + } +} diff -r 36e896c73c8a -r 893c2d75daf4 run/s/static_if_05_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_if_05_A.d Sat Jun 11 06:07:28 2005 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Thomas Kuehne +// @date@ 2005-06-10 +// @uri@ news:oouon2-li3.ln1@lnews.kuehne.cn +// @desc@ mixing "static if" and "if" + +module dstress.run.s.static_of_05_A; + +int main(){ + const int i=1; + static if(i==1){ + return 0; + }else if(i==2){ + return 1; + } +} diff -r 36e896c73c8a -r 893c2d75daf4 run/s/static_if_05_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_if_05_B.d Sat Jun 11 06:07:28 2005 +0000 @@ -0,0 +1,21 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Thomas Kuehne +// @date@ 2005-06-10 +// @uri@ news:oouon2-li3.ln1@lnews.kuehne.cn +// @desc@ mixing "static if" and "if" + +module dstress.run.s.static_of_05_B; + +int main(){ + const int i=3; + if(i==1){ + return 2; + }else static if(i==2){ + return 1; + }else if(i==3){ + return 0; + } +} diff -r 36e896c73c8a -r 893c2d75daf4 undefined/static_if_05_A.d --- a/undefined/static_if_05_A.d Fri Jun 10 19:10:21 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Thomas Kuehne -// @date@ 2005-06-10 -// @uri@ news:oouon2-li3.ln1@lnews.kuehne.cn -// @desc@ mixing "static if" and "if" - -module dstress.undefined.static_of_05_A; - -int main(){ - const int i=1; - static if(i==1){ - return 0; - }else if(i==2){ - return 1; - } -} diff -r 36e896c73c8a -r 893c2d75daf4 undefined/static_if_05_B.d --- a/undefined/static_if_05_B.d Fri Jun 10 19:10:21 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Thomas Kuehne -// @date@ 2005-06-10 -// @uri@ news:oouon2-li3.ln1@lnews.kuehne.cn -// @desc@ mixing "static if" and "if" - -module dstress.undefined.static_of_05_B; - -int main(){ - const int i=1; - if(i==1){ - return 0; - }else static if(i==2){ - return 1; - }else if(i==3){ - return 2; - } -}