Changeset 2204 for trunk/psLib/test/collections/tst_psBitSet.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psBitSet.c (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psBitSet.c
r1807 r2204 17 17 * @author Ross Harman, MHPCC 18 18 * 19 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $20 * @date $Date: 2004- 09-14 20:01:52$19 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 20 * @date $Date: 2004-10-27 00:57:33 $ 21 21 * 22 22 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 27 27 #include "psTest.h" 28 28 29 static inttestBitSet01a(void);30 static inttestBitSet01b(void);31 static inttestBitSet01c(void);32 static inttestBitSet02(void);33 static inttestBitSet03(void);34 static inttestBitSet04(void);35 static inttestBitSet05(void);36 static inttestBitSet06(void);29 static psS32 testBitSet01a(void); 30 static psS32 testBitSet01b(void); 31 static psS32 testBitSet01c(void); 32 static psS32 testBitSet02(void); 33 static psS32 testBitSet03(void); 34 static psS32 testBitSet04(void); 35 static psS32 testBitSet05(void); 36 static psS32 testBitSet06(void); 37 37 38 38 testDescription tests[] = { … … 50 50 51 51 52 int main( intargc, char* argv[] )52 psS32 main( psS32 argc, char* argv[] ) 53 53 { 54 54 psLogSetLevel( PS_LOG_INFO ); … … 57 57 } 58 58 59 inttestBitSet01a(void)59 psS32 testBitSet01a(void) 60 60 { 61 61 psErr* err; … … 109 109 } 110 110 111 inttestBitSet01b(void)111 psS32 testBitSet01b(void) 112 112 { 113 113 char *binOut = NULL; … … 212 212 } 213 213 214 static inttestBitSet01c(void)214 static psS32 testBitSet01c(void) 215 215 { 216 216 psBitSet* bs = psBitSetAlloc(24); … … 275 275 } 276 276 277 inttestBitSet02()277 psS32 testBitSet02() 278 278 { 279 279 char *binOut1 = NULL; … … 284 284 psBitSet* bs2 = psBitSetAlloc(24); 285 285 psBitSet* and = psBitSetAlloc(24); 286 for( inti=0; i<24; i++) {286 for(psS32 i=0; i<24; i++) { 287 287 if ((i & 2) == 0) { 288 288 bs1 = psBitSetSet(bs1, i); … … 312 312 } 313 313 314 for( inti=0; i<24; i++) {315 bool truth = psBitSetTest(and,i);316 bool res = psBitSetTest(outbs,i);314 for(psS32 i=0; i<24; i++) { 315 psBool truth = psBitSetTest(and,i); 316 psBool res = psBitSetTest(outbs,i); 317 317 if ( res != truth) { 318 318 binOut1 = psBitSetToString(bs1); … … 331 331 psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result"); 332 332 } 333 for( inti=0; i<24; i++) {334 bool truth = psBitSetTest(and,i);335 bool res = psBitSetTest(outbs,i);333 for(psS32 i=0; i<24; i++) { 334 psBool truth = psBitSetTest(and,i); 335 psBool res = psBitSetTest(outbs,i); 336 336 if ( res != truth) { 337 337 binOut1 = psBitSetToString(bs1); … … 351 351 } 352 352 353 static inttestBitSet03(void)353 static psS32 testBitSet03(void) 354 354 { 355 355 char *binOut1 = NULL; … … 360 360 psBitSet* bs2 = psBitSetAlloc(24); 361 361 psBitSet* or = psBitSetAlloc(24); 362 for( inti=0; i<24; i++) {362 for(psS32 i=0; i<24; i++) { 363 363 if ((i/2) % 2) { 364 364 bs1 = psBitSetSet(bs1, i); … … 389 389 } 390 390 391 for( inti=0; i<24; i++) {392 bool truth = psBitSetTest(or,i);393 bool res = psBitSetTest(outbs,i);391 for(psS32 i=0; i<24; i++) { 392 psBool truth = psBitSetTest(or,i); 393 psBool res = psBitSetTest(outbs,i); 394 394 if ( res != truth) { 395 395 binOut1 = psBitSetToString(bs1); … … 408 408 psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result"); 409 409 } 410 for( inti=0; i<24; i++) {411 bool truth = psBitSetTest(or,i);412 bool res = psBitSetTest(outbs,i);410 for(psS32 i=0; i<24; i++) { 411 psBool truth = psBitSetTest(or,i); 412 psBool res = psBitSetTest(outbs,i); 413 413 if ( res != truth) { 414 414 binOut1 = psBitSetToString(bs1); … … 429 429 } 430 430 431 static inttestBitSet04(void)431 static psS32 testBitSet04(void) 432 432 { 433 433 char *binOut1 = NULL; … … 438 438 psBitSet* bs2 = psBitSetAlloc(24); 439 439 psBitSet* xor = psBitSetAlloc(24); 440 for( inti=0; i<24; i++) {440 for(psS32 i=0; i<24; i++) { 441 441 if ((i/2) % 2) { 442 442 bs1 = psBitSetSet(bs1, i); … … 467 467 } 468 468 469 for( inti=0; i<24; i++) {470 bool truth = psBitSetTest(xor,i);471 bool res = psBitSetTest(outbs,i);469 for(psS32 i=0; i<24; i++) { 470 psBool truth = psBitSetTest(xor,i); 471 psBool res = psBitSetTest(outbs,i); 472 472 if ( res != truth) { 473 473 binOut1 = psBitSetToString(bs1); … … 486 486 psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result"); 487 487 } 488 for( inti=0; i<24; i++) {489 bool truth = psBitSetTest(xor,i);490 bool res = psBitSetTest(outbs,i);488 for(psS32 i=0; i<24; i++) { 489 psBool truth = psBitSetTest(xor,i); 490 psBool res = psBitSetTest(outbs,i); 491 491 if ( res != truth) { 492 492 binOut1 = psBitSetToString(bs1); … … 507 507 } 508 508 509 static inttestBitSet05(void)509 static psS32 testBitSet05(void) 510 510 { 511 511 char *binOut1 = NULL; … … 514 514 psBitSet* bs1 = psBitSetAlloc(24); 515 515 psBitSet* not = psBitSetAlloc(24); 516 for( inti=0; i<24; i++) {516 for(psS32 i=0; i<24; i++) { 517 517 if (i % 2) { 518 518 bs1 = psBitSetSet(bs1, i); … … 538 538 } 539 539 540 for( inti=0; i<24; i++) {541 bool truth = psBitSetTest(not,i);542 bool res = psBitSetTest(outbs,i);540 for(psS32 i=0; i<24; i++) { 541 psBool truth = psBitSetTest(not,i); 542 psBool res = psBitSetTest(outbs,i); 543 543 if ( res != truth) { 544 544 binOut1 = psBitSetToString(bs1); … … 556 556 psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result"); 557 557 } 558 for( inti=0; i<24; i++) {559 bool truth = psBitSetTest(not,i);560 bool res = psBitSetTest(outbs,i);558 for(psS32 i=0; i<24; i++) { 559 psBool truth = psBitSetTest(not,i); 560 psBool res = psBitSetTest(outbs,i); 561 561 if ( res != truth) { 562 562 binOut1 = psBitSetToString(bs1); … … 575 575 } 576 576 577 static inttestBitSet06(void)577 static psS32 testBitSet06(void) 578 578 { 579 579 psErr* err;
Note:
See TracChangeset
for help on using the changeset viewer.
