# HG changeset patch # User thomask # Date 1123966483 0 # Node ID caa75b9cf2f43ccdcb5bd3891efeef26a8cc6a9c # Parent a57ea0ea4615dcce261503c59c5f322de9dcdfe5 Negative numbers are treated as Positive in compares. David L. Davis 2005-08-10 news:dddj2k$lrr$1@digitaldaemon.com diff -r a57ea0ea4615 -r caa75b9cf2f4 run/o/opCmp_05_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCmp_05_A.d Sat Aug 13 20:54:43 2005 +0000 @@ -0,0 +1,34 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David L. Davis +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ Negative numbers are treated as Positive in compares. + +module dstress.run.o.opCmp_05_A; + +int main(){ + if(128<0){ + assert(0); + } + + if(128<=0){ + assert(0); + } + + if(128>0){ + assert(1); + }else{ + assert(0); + } + + if(128>=0){ + assert(1); + }else{ + assert(0); + } + + return 0; +} diff -r a57ea0ea4615 -r caa75b9cf2f4 run/o/opCmp_05_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCmp_05_B.d Sat Aug 13 20:54:43 2005 +0000 @@ -0,0 +1,35 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David L. Davis +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ Negative numbers are treated as Positive in compares. + + +module dstress.run.o.opCmp_05_B; + +int main(){ + if(-128<0){ + assert(1); + }else{ + assert(0); + } + + if(-128<=0){ + assert(1); + }else{ + assert(0); + } + + if(-128>0){ + assert(0); + } + + if(-128>=0){ + assert(0); + } + + return 0; +} diff -r a57ea0ea4615 -r caa75b9cf2f4 run/o/opCmp_05_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCmp_05_C.d Sat Aug 13 20:54:43 2005 +0000 @@ -0,0 +1,34 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David L. Davis +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ Negative numbers are treated as Positive in compares. + +module dstress.run.o.opCmp_05_C; + +int main(){ + static if(-128<0){ + assert(1); + }else{ + assert(0); + } + + static if(-128<=0){ + assert(1); + }else{ + assert(0); + } + + static if(-128>0){ + assert(0); + } + + static if(-128>=0){ + assert(0); + } + + return 0; +} diff -r a57ea0ea4615 -r caa75b9cf2f4 run/o/opCmp_05_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCmp_05_D.d Sat Aug 13 20:54:43 2005 +0000 @@ -0,0 +1,34 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David L. Davis +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ Negative numbers are treated as Positive in compares. + +module dstress.run.o.opCmp_05_D; + +int main(){ + static if(128<0){ + assert(0); + } + + static if(128<=0){ + assert(0); + } + + static if(128>0){ + assert(1); + }else{ + assert(0); + } + + static if(128>=0){ + assert(1); + }else{ + assert(0); + } + + return 0; +} diff -r a57ea0ea4615 -r caa75b9cf2f4 run/o/opCmp_05_E.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCmp_05_E.d Sat Aug 13 20:54:43 2005 +0000 @@ -0,0 +1,36 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David L. Davis +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ Negative numbers are treated as Positive in compares. + +module dstress.run.o.opCmp_05_E; + +int main(){ + int i=128; + + if(i<0){ + assert(0); + } + + if(i<=0){ + assert(0); + } + + if(i>0){ + assert(1); + }else{ + assert(0); + } + + if(i>=0){ + assert(1); + }else{ + assert(0); + } + + return 0; +} diff -r a57ea0ea4615 -r caa75b9cf2f4 run/o/opCmp_05_F.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCmp_05_F.d Sat Aug 13 20:54:43 2005 +0000 @@ -0,0 +1,36 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David L. Davis +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ Negative numbers are treated as Positive in compares. + +module dstress.run.o.opCmp_05_F; + +int main(){ + int i=-128; + + if(i<0){ + assert(1); + }else{ + assert(0); + } + + if(i<=0){ + assert(1); + }else{ + assert(0); + } + + if(i>0){ + assert(0); + } + + if(i>=0){ + assert(0); + } + + return 0; +}