X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.benjamin%2Fbool02.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.benjamin%2Fbool02.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=c17c935287bb428fd65b9d9e35f291005b0e3d2b;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/bool02.C b/gcc/testsuite/g++.old-deja/g++.benjamin/bool02.C deleted file mode 100644 index c17c9352..00000000 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/bool02.C +++ /dev/null @@ -1,63 +0,0 @@ -//980324 bkoz -//test for bool and bitwise ands - -#include - - -void bar ( bool x ) {}; -void bars ( short x ) {}; - -#if 0 -int andb(){ - bool y; - bar ( y ); - int blob = ( 27 & int (y) ); - return blob; //expect 1 or 0 -} -#endif - -int andbtrue(){ - bool y = true; - bar ( y ); - int blob = ( 27 & int (y) ); - return blob; //expect 1 -} - -int andbfalse(){ - bool y = false; - bar ( y ); - int blob = ( 27 & int (y) ); - return blob; //expect 0 -} - -int andbfalse2(){ - bool y = 0; - bar ( y ); - int blob = ( 27 & int (y) ); - return blob; //expect 0 -} - -int ands(){ - short y = 1; - bars ( y ); - int blob = ( 27 & int (y) ); - return blob; //expect 1 -} - - -int main() { - int tmp; -#if 0 - tmp = andb(); - assert (tmp == 1 || tmp == 0); -#endif - tmp = andbtrue(); - assert (tmp == 1); - tmp = andbfalse(); - assert (tmp == 0); - tmp = andbfalse2(); - assert (tmp == 0); - tmp = ands(); - assert (tmp == 1); - return 0; -}