Changeset 11686 for trunk/psLib/test/types
- Timestamp:
- Feb 7, 2007, 1:52:54 PM (19 years ago)
- Location:
- trunk/psLib/test/types
- Files:
-
- 6 edited
-
tst_psBitSet.c (modified) (36 diffs)
-
tst_psHash00.c (modified) (1 diff)
-
tst_psHash01.c (modified) (1 diff)
-
tst_psHash02.c (modified) (1 diff)
-
tst_psHash03.c (modified) (1 diff)
-
tst_psHash04.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/types/tst_psBitSet.c
r8966 r11686 17 17 * @author Ross Harman, MHPCC 18 18 * 19 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $20 * @date $Date: 200 6-09-26 01:47:22$19 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 20 * @date $Date: 2007-02-07 23:52:54 $ 21 21 * 22 22 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 123 123 psBitSetTest(bs,23) ) { 124 124 125 psAbort(" testBitSet01b","psBitSetAlloc failed to clear all bits at allocation.");125 psAbort("psBitSetAlloc failed to clear all bits at allocation."); 126 126 } 127 127 … … 135 135 bs = psBitSetSet(bs, 23); 136 136 if(bs != tempBs) { 137 psAbort("testBitSet01b", 138 "Return pointer not equal to output argument pointer."); 137 psAbort( "Return pointer not equal to output argument pointer."); 139 138 } 140 139 if(bs->bits[0] != 0x05) { 141 psAbort(__func__, 142 "Unexpected value for first byte (%d vs 5).", 140 psAbort( "Unexpected value for first byte (%d vs 5).", 143 141 bs->bits[0]); 144 142 } … … 154 152 ! psBitSetTest(bs,23) ) { 155 153 156 psAbort(" testBitSet01b","Failed to set a bit.");154 psAbort("Failed to set a bit."); 157 155 } 158 156 … … 173 171 psBitSetTest(bs,23) ) { 174 172 175 psAbort(" testBitSet01b","Failed to clear a bit.");173 psAbort("Failed to clear a bit."); 176 174 } 177 175 … … 195 193 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 196 194 psErrorStackPrint(stderr,"Error Stack:"); 197 psAbort(" testBitSet01c","psBitSetSet(bs, -4) didn't generate expected error.\n");195 psAbort("psBitSetSet(bs, -4) didn't generate expected error.\n"); 198 196 } 199 197 psFree(err); … … 206 204 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 207 205 psErrorStackPrint(stderr,"Error Stack:"); 208 psAbort(" testBitSet01c","psBitSetSet(bs, 200) didn't generate expected error.\n");206 psAbort("psBitSetSet(bs, 200) didn't generate expected error.\n"); 209 207 } 210 208 psFree(err); … … 217 215 if (err->code != PS_ERR_BAD_PARAMETER_NULL) { 218 216 psErrorStackPrint(stderr,"Error Stack:"); 219 psAbort(" testBitSet01c","psBitSetSet(NULL,0) didn't generate expected error.\n");217 psAbort("psBitSetSet(NULL,0) didn't generate expected error.\n"); 220 218 } 221 219 psFree(err); … … 242 240 ! psBitSetTest(bs,23) ) { 243 241 244 psAbort(" testBitSet01c","Set bits returned false.");242 psAbort("Set bits returned false."); 245 243 } 246 244 … … 248 246 psErrorClear(); 249 247 if(psBitSetTest(bs, -4)) { 250 psAbort(" testBitSet01c","psBitSetTest returned true with negative bit position.\n");248 psAbort("psBitSetTest returned true with negative bit position.\n"); 251 249 } 252 250 … … 254 252 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 255 253 psErrorStackPrint(stderr,"Error Stack:"); 256 psAbort(" testBitSet01c","psBitSetTest(bs, -4) didn't generate proper error.\n");254 psAbort("psBitSetTest(bs, -4) didn't generate proper error.\n"); 257 255 } 258 256 psFree(err); … … 261 259 psErrorClear(); 262 260 if(psBitSetTest(bs, 200)) { 263 psAbort(" testBitSet01c","psBitSetTest returned true with too-large bit position.\n");261 psAbort("psBitSetTest returned true with too-large bit position.\n"); 264 262 } 265 263 … … 267 265 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 268 266 psErrorStackPrint(stderr,"Error Stack:"); 269 psAbort(" testBitSet01c","psBitSetTest(bs, 200) didn't generate proper error.\n");267 psAbort("psBitSetTest(bs, 200) didn't generate proper error.\n"); 270 268 } 271 269 psFree(err); … … 274 272 psErrorClear(); 275 273 if (psBitSetTest(NULL, 0)) { 276 psAbort(" testBitSet01c","psBitSetTest returned true with NULL psBitSet.\n");274 psAbort("psBitSetTest returned true with NULL psBitSet.\n"); 277 275 } 278 276 … … 280 278 if (err->code != PS_ERR_BAD_PARAMETER_NULL) { 281 279 psErrorStackPrint(stderr,"Error Stack:"); 282 psAbort(" testBitSet01c","psBitSetTest(NULL, 0) didn't generate proper error.\n");280 psAbort("psBitSetTest(NULL, 0) didn't generate proper error.\n"); 283 281 } 284 282 psFree(err); … … 323 321 outbs = psBitSetOp(outbs, bs1, "AND", bs2); 324 322 if (outbs == NULL) { 325 psAbort( __func__,"psBitSetOp returned a NULL result for AND operation");323 psAbort("psBitSetOp returned a NULL result for AND operation"); 326 324 } 327 325 … … 333 331 binOut2 = psBitSetToString(bs2); 334 332 binOut3 = psBitSetToString(outbs); 335 psAbort( __func__,"psBitSetOp with AND operator failed.\nInput was %s, %s. Output was %s",333 psAbort("psBitSetOp with AND operator failed.\nInput was %s, %s. Output was %s", 336 334 binOut1,binOut2,binOut3); 337 335 } … … 343 341 outbs = psBitSetOp(NULL, bs1, "AND", bs2); 344 342 if (outbs == NULL) { 345 psAbort( __func__,"psBitSetOp failed to create a new psBitSet for the result");343 psAbort("psBitSetOp failed to create a new psBitSet for the result"); 346 344 } 347 345 for(psS32 i=0; i<24; i++) { … … 352 350 binOut2 = psBitSetToString(bs2); 353 351 binOut3 = psBitSetToString(outbs); 354 psAbort( __func__,"psBitSetOp with AND operator failed.\nInput was %s, %s. Output was %s",352 psAbort("psBitSetOp with AND operator failed.\nInput was %s, %s. Output was %s", 355 353 binOut1,binOut2,binOut3); 356 354 } … … 400 398 outbs = psBitSetOp(outbs, bs1, "OR", bs2); 401 399 if (outbs == NULL) { 402 psAbort( __func__,"psBitSetOp returned a NULL result for OR operation");400 psAbort("psBitSetOp returned a NULL result for OR operation"); 403 401 } 404 402 … … 410 408 binOut2 = psBitSetToString(bs2); 411 409 binOut3 = psBitSetToString(outbs); 412 psAbort( __func__,"psBitSetOp with OR operator failed.\nInput was %s, %s. Output was %s",410 psAbort("psBitSetOp with OR operator failed.\nInput was %s, %s. Output was %s", 413 411 binOut1,binOut2,binOut3); 414 412 } … … 420 418 outbs = psBitSetOp(NULL, bs1, "OR", bs2); 421 419 if (outbs == NULL) { 422 psAbort( __func__,"psBitSetOp failed to create a new psBitSet for the result");420 psAbort("psBitSetOp failed to create a new psBitSet for the result"); 423 421 } 424 422 for(psS32 i=0; i<24; i++) { … … 429 427 binOut2 = psBitSetToString(bs2); 430 428 binOut3 = psBitSetToString(outbs); 431 psAbort( __func__,"psBitSetOp with OR operator failed.\nInput was %s, %s. Output was %s",429 psAbort("psBitSetOp with OR operator failed.\nInput was %s, %s. Output was %s", 432 430 binOut1,binOut2,binOut3); 433 431 } … … 478 476 outbs = psBitSetOp(outbs, bs1, "XOR", bs2); 479 477 if (outbs == NULL) { 480 psAbort( __func__,"psBitSetOp returned a NULL result for XOR operation");478 psAbort("psBitSetOp returned a NULL result for XOR operation"); 481 479 } 482 480 … … 488 486 binOut2 = psBitSetToString(bs2); 489 487 binOut3 = psBitSetToString(outbs); 490 psAbort( __func__,"psBitSetOp with XOR operator failed.\nInput was %s, %s. Output was %s",488 psAbort("psBitSetOp with XOR operator failed.\nInput was %s, %s. Output was %s", 491 489 binOut1,binOut2,binOut3); 492 490 } … … 498 496 outbs = psBitSetOp(NULL, bs1, "XOR", bs2); 499 497 if (outbs == NULL) { 500 psAbort( __func__,"psBitSetOp failed to create a new psBitSet for the result");498 psAbort("psBitSetOp failed to create a new psBitSet for the result"); 501 499 } 502 500 for(psS32 i=0; i<24; i++) { … … 507 505 binOut2 = psBitSetToString(bs2); 508 506 binOut3 = psBitSetToString(outbs); 509 psAbort( __func__,"psBitSetOp with XOR operator failed.\nInput was %s, %s. Output was %s",507 psAbort("psBitSetOp with XOR operator failed.\nInput was %s, %s. Output was %s", 510 508 binOut1,binOut2,binOut3); 511 509 } … … 549 547 outbs = psBitSetNot(outbs, bs1); 550 548 if (outbs == NULL) { 551 psAbort( __func__,"psBitSetOp returned a NULL result for NOT operation");549 psAbort("psBitSetOp returned a NULL result for NOT operation"); 552 550 } 553 551 … … 558 556 binOut1 = psBitSetToString(bs1); 559 557 binOut2 = psBitSetToString(outbs); 560 psAbort( __func__,"psBitSetOp with NOT operator failed.\nInput was %s. Output was %s",558 psAbort("psBitSetOp with NOT operator failed.\nInput was %s. Output was %s", 561 559 binOut1,binOut2); 562 560 } … … 568 566 outbs = psBitSetNot(NULL, bs1); 569 567 if (outbs == NULL) { 570 psAbort( __func__,"psBitSetOp failed to create a new psBitSet for the result");568 psAbort("psBitSetOp failed to create a new psBitSet for the result"); 571 569 } 572 570 for(psS32 i=0; i<24; i++) { … … 576 574 binOut1 = psBitSetToString(bs1); 577 575 binOut2 = psBitSetToString(outbs); 578 psAbort( __func__,"psBitSetOp with NOT operator failed.\nInput was %s. Output was %s",576 psAbort("psBitSetOp with NOT operator failed.\nInput was %s. Output was %s", 579 577 binOut1,binOut2); 580 578 } … … 605 603 psBitSet* outbs = psBitSetOp(NULL, bs1, "XOR", bs2); 606 604 if (outbs != NULL) { 607 psAbort( __func__,"psBitSetOp did not return a NULL result when input sizes differ");605 psAbort("psBitSetOp did not return a NULL result when input sizes differ"); 608 606 } 609 607 … … 611 609 if (err->code != PS_ERR_BAD_PARAMETER_SIZE) { 612 610 psErrorStackPrint(stderr,"Error Stack:"); 613 psAbort( __func__,"psBitSetOp didn't generate expected error with operands' sizes differed.");611 psAbort("psBitSetOp didn't generate expected error with operands' sizes differed."); 614 612 } 615 613 psFree(err); … … 623 621 psBitSet* outbs2 = psBitSetOp(outbs, bs1, "XOR", bs2); 624 622 if (outbs2 == NULL) { 625 psAbort( __func__,"psBitSetOp failed when input size and output size differed (a recoverable error).");623 psAbort("psBitSetOp failed when input size and output size differed (a recoverable error)."); 626 624 } 627 625 if (outbs2 != outbs) { 628 psAbort( __func__,"psBitSetOp didn't reuse the given output struct.");626 psAbort("psBitSetOp didn't reuse the given output struct."); 629 627 } 630 628 if (outbs2->n != bs1->n) { 631 psAbort( __func__,"psBitSetOp did properly adjust the output psBitSet size.");629 psAbort("psBitSetOp did properly adjust the output psBitSet size."); 632 630 } 633 631 … … 636 634 outbs = psBitSetOp(outbs, bs1, "FOO", bs2); 637 635 if (outbs != NULL) { 638 psAbort( __func__,"psBitSetOp returned something in case of a bogus operation.");636 psAbort("psBitSetOp returned something in case of a bogus operation."); 639 637 } 640 638 err = psErrorLast(); 641 639 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 642 640 psErrorStackPrint(stderr,"Error Stack:"); 643 psAbort( __func__,"psBitSetOp didn't generate expected error with bogus operator.");641 psAbort("psBitSetOp didn't generate expected error with bogus operator."); 644 642 } 645 643 psFree(err); … … 655 653 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 656 654 psErrorStackPrint(stderr,"Error Stack:"); 657 psAbort( __func__,"psBitSetOp didn't generate expected error with bogus operator.");655 psAbort("psBitSetOp didn't generate expected error with bogus operator."); 658 656 } 659 657 psFree(err); -
trunk/psLib/test/types/tst_psHash00.c
r4547 r11686 57 57 memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false); 58 58 if (0 != memLeaks) { 59 psAbort( __func__,"Memory Leaks! (%d leaks)", memLeaks);59 psAbort("Memory Leaks! (%d leaks)", memLeaks); 60 60 } 61 61 psMemCheckCorruption(1); -
trunk/psLib/test/types/tst_psHash01.c
r4547 r11686 148 148 memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false); 149 149 if (memLeaks != 0) { 150 psAbort( __func__,"Memory Leaks! (%d leaks)", memLeaks);150 psAbort("Memory Leaks! (%d leaks)", memLeaks); 151 151 } 152 152 psMemCheckCorruption(1); -
trunk/psLib/test/types/tst_psHash02.c
r4547 r11686 106 106 memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false); 107 107 if (0 != memLeaks) { 108 psAbort( __func__,"Memory Leaks! (%d leaks)", memLeaks);108 psAbort("Memory Leaks! (%d leaks)", memLeaks); 109 109 } 110 110 psMemCheckCorruption(1); -
trunk/psLib/test/types/tst_psHash03.c
r4547 r11686 134 134 memLeaks = psMemCheckLeaks(currentId,NULL,stdout,false); 135 135 if (memLeaks != 0) { 136 psAbort( __func__,"Memory Leaks! (%d leaks)", memLeaks);136 psAbort("Memory Leaks! (%d leaks)", memLeaks); 137 137 } 138 138 psMemCheckCorruption(true); -
trunk/psLib/test/types/tst_psHash04.c
r4547 r11686 77 77 memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false); 78 78 if (memLeaks != 0) { 79 psAbort( __func__,"Memory Leaks! (%d leaks)", memLeaks);79 psAbort("Memory Leaks! (%d leaks)", memLeaks); 80 80 } 81 81 psMemCheckCorruption(1);
Note:
See TracChangeset
for help on using the changeset viewer.
