Changeset 1073 for trunk/psLib/test/image/tst_psImage.c
- Timestamp:
- Jun 23, 2004, 1:00:17 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/image/tst_psImage.c (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImage.c
r1033 r1073 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06- 14 23:03:43$8 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-23 23:00:15 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 75 75 psError(__func__,"psImageAlloc returned NULL for type %x, size %dx%d.", 76 76 type[t], numCols[i], numRows[i]); 77 ps ImageFree(image);77 psFree(image); 78 78 return 1; 79 79 } … … 82 82 psError(__func__,"psImageAlloc allocated wrong dimen/type (%d/%d), should be " 83 83 "PS_IMAGE_DIMEN/%d", image->type.dimen, image->type.type, type[t]); 84 ps ImageFree(image);84 psFree(image); 85 85 return 2; 86 86 } … … 89 89 psError(__func__,"psImageAlloc allocated wrong size %dx%d, should be %dx%d (type = %d)", 90 90 image->numCols, image->numRows, numCols[i], numRows[i],type[t]); 91 ps ImageFree(image);91 psFree(image); 92 92 return 3; 93 93 } … … 96 96 psError(__func__,"psImageAlloc returned row0/col0 of %d/%d. Should be 0/0.", 97 97 image->row0, image->row0); 98 ps ImageFree(image);98 psFree(image); 99 99 return 4; 100 100 } … … 102 102 if (image->parent != NULL) { 103 103 psError(__func__,"psImageAlloc returned non-NULL parent"); 104 ps ImageFree(image);104 psFree(image); 105 105 return 5; 106 106 } … … 108 108 if (image->nChildren != 0) { 109 109 psError(__func__,"psImageAlloc returned non-zero number of children"); 110 ps ImageFree(image);110 psFree(image); 111 111 return 6; 112 112 } … … 114 114 if (image->children != NULL) { 115 115 psError(__func__,"psImageAlloc returned non-NULL children vector"); 116 ps ImageFree(image);116 psFree(image); 117 117 return 7; 118 118 } … … 132 132 if (image->data.U16[r][c] != 2*c+r) { 133 133 psError(__func__,"Could not set all pixels in uint16 image at (%d,%d)",c,r); 134 ps ImageFree(image);134 psFree(image); 135 135 return 8; 136 136 } … … 152 152 if (fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON) { 153 153 psError(__func__,"Could not set all pixels in float image at (%d,%d)",c,r); 154 ps ImageFree(image);154 psFree(image); 155 155 return 8; 156 156 } … … 172 172 if (fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON) { 173 173 psError(__func__,"Could not set all pixels in double image at (%d,%d)",c,r); 174 ps ImageFree(image);174 psFree(image); 175 175 return 8; 176 176 } … … 193 193 fabsf(cimagf(image->data.C32[r][c]) - c) > FLT_EPSILON ) { 194 194 psError(__func__,"Could not set all pixels in complex image at (%d,%d)",c,r); 195 ps ImageFree(image);195 psFree(image); 196 196 return 8; 197 197 } … … 215 215 psError(__func__,"Could not set all pixels in image (type=%d) at (%d,%d)", 216 216 type[t],c,r); 217 ps ImageFree(image);217 psFree(image); 218 218 return 8; 219 219 } … … 225 225 // #548: Verify no memory leaks or corruption are detected after a valid psImage structure with no 226 226 // children is freed. 227 ps ImageFree(image);227 psFree(image); 228 228 } 229 229 } 230 230 231 231 // #548: Verify program execution doesn't stop, if the input psImage structure pointer is null. 232 ps ImageFree(NULL);232 psFree(NULL); 233 233 234 234 // #548: Verify no memory leaks or corruption are detected after a valid psImage structure with multiple … … 238 238 psImageSubset(NULL,image,50,50,20,20); 239 239 240 ps ImageFree(image);240 psFree(image); 241 241 242 242 return 0; … … 501 501 } 502 502 503 ps ImageFree(original);503 psFree(original); 504 504 505 505 return 0; … … 599 599 } 600 600 601 ps ImageFree(img);602 ps ImageFree(img2);601 psFree(img); 602 psFree(img2); 603 603 604 604 return 0; … … 678 678 return 2; \ 679 679 } \ 680 ps ImageFree(img);680 psFree(img); 681 681 682 682 #define testImageClipByComplexType(datatype) \ … … 718 718 return 2; \ 719 719 } \ 720 ps ImageFree(img);720 psFree(img); 721 721 722 722 psLogMsg(__func__,PS_LOG_INFO,"Testing clipping of F64 imagery"); … … 824 824 return 2; \ 825 825 } \ 826 ps ImageFree(img);826 psFree(img); 827 827 828 828 testImageClipNaNByType(F32); … … 906 906 } \ 907 907 } \ 908 ps ImageFree(img); \909 ps ImageFree(img2);908 psFree(img); \ 909 psFree(img2); 910 910 911 911 #define testOverlayType(DATATYPE) \ … … 1016 1016 } 1017 1017 1018 ps ImageFree(img);1019 ps ImageFree(img2);1018 psFree(img); 1019 psFree(img2); 1020 1020 1021 1021 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
