Changeset 3285 for trunk/psLib/test/collections/tst_psBitSet.c
- Timestamp:
- Feb 18, 2005, 11:37:15 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psBitSet.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psBitSet.c
r3264 r3285 17 17 * @author Ross Harman, MHPCC 18 18 * 19 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $20 * @date $Date: 2005-02-1 7 19:26:24$19 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 20 * @date $Date: 2005-02-18 21:37:15 $ 21 21 * 22 22 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 fprintf(stderr,"Creating psBitSet with 24 bits...\n"); 65 65 psBitSet* bs = psBitSetAlloc(24); 66 67 66 if (bs == NULL) { 68 ps Abort(__func__,"Failed to create a psBitSet");69 }70 67 psError(PS_ERR_UNKNOWN,true,"Failed to create a psBitSet"); 68 return 1; 69 } 71 70 if (bs->n != 3) { 72 psAbort(__func__,"Number of bytes for psBitSet incorrect (%d vs 3)",bs->n); 73 } 74 71 psError(PS_ERR_UNKNOWN,true,"Number of bytes for psBitSet incorrect (%d vs 3)", 72 bs->n); 73 return 2; 74 } 75 75 if (bs->bits[0] != 0 || bs->bits[1] != 0 || bs->bits[2] != 0) { 76 ps Abort(__func__,"psBitSetAlloc didn't clear outthe bits by default (%x%x%x).",76 psError(PS_ERR_UNKNOWN,true,"psBitSetAlloc didn't clean ou the bits by default (%x%x%x).", 77 77 bs->bits[2],bs->bits[1],bs->bits[0]); 78 }79 78 return 3; 79 } 80 80 psFree(bs); 81 81 … … 83 83 fprintf(stderr,"Creating psBitSet with 25 bits...\n"); 84 84 bs = psBitSetAlloc(25); 85 86 85 if (bs == NULL) { 87 ps Abort("testBitSet01a","Failed to create a psBitSet with 25 bits");88 }89 86 psError(PS_ERR_UNKNOWN,true,"Failed to create a psBitSet with 25 bits"); 87 return 4; 88 } 90 89 if (bs->n != 4) { 91 psAbort("testBitSet01a","Number of bytes for psBitSet incorrect (%d vs 4)",bs->n); 90 psError(PS_ERR_UNKNOWN,true,"Number of bytes for psBitSet incorrect (%d vs 4)",bs->n); 91 return 5; 92 92 } 93 93 psFree(bs); … … 97 97 bs = psBitSetAlloc(-4); 98 98 if (bs != NULL) { 99 psAbort(__func__,"psBitSetAlloc returned something in case of a negative sized psBitSet."); 99 psError(PS_ERR_UNKNOWN,true,"psBitSetAlloc returned something in case of a negative size"); 100 return 6; 100 101 } 101 102 err = psErrorLast(); 102 103 if (err->code != PS_ERR_BAD_PARAMETER_VALUE) { 103 104 psErrorStackPrint(stderr,"Error Stack:"); 104 psAbort(__func__,"psBitSetAlloc didn't generate expected error with size = -4."); 105 psError(PS_ERR_UNKNOWN,true,"psBitSetAlloc didn't generate expected error with size = -4"); 106 return 7; 105 107 } 106 108 psFree(err);
Note:
See TracChangeset
for help on using the changeset viewer.
