Changeset 953 for trunk/psLib/test/image/tst_psImage.c
- Timestamp:
- Jun 9, 2004, 11:20:53 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/image/tst_psImage.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImage.c
r949 r953 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06-09 2 0:34:34$8 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-09 21:20:53 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 48 48 int testImageAlloc(void) 49 49 { 50 int currentId = psMemGetId();51 50 psImage* image = NULL; 52 51 unsigned int sizes = 6; … … 224 223 // children is freed. 225 224 psImageFree(image); 226 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {227 psError(__func__,"Memory Leaks Detected");228 return 64;229 }230 psMemCheckCorruption(1);231 232 225 } 233 226 } … … 235 228 // #548: Verify program execution doesn't stop, if the input psImage structure pointer is null. 236 229 psImageFree(NULL); 237 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {238 psError(__func__,"Memory Leaks Detected");239 return 64;240 }241 psMemCheckCorruption(1);242 230 243 231 // #548: Verify no memory leaks or corruption are detected after a valid psImage structure with multiple … … 249 237 psImageFree(image); 250 238 251 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {252 psError(__func__,"Memory Leaks Detected");253 return 64;254 }255 psMemCheckCorruption(1);256 257 239 return 0; 258 240 } … … 261 243 int testImageSubset(void) 262 244 { 263 int currentId = psMemGetId();264 245 psImage preSubsetStruct; 265 246 psImage* original; … … 519 500 psImageFree(original); 520 501 521 // Verify no memory leaks or corruption are detected for a psImage structure522 // Verify no memory leaks or corruption are detected for a psImage structure523 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {524 psError(__func__,"Memory Leaks Detected");525 return 64;526 }527 psMemCheckCorruption(1);528 529 502 return 0; 530 503 } … … 537 510 unsigned int c = 128; 538 511 unsigned int r = 256; 539 int currentId = psMemGetId();540 512 541 513 img = psImageAlloc(c,r,PS_TYPE_F32); … … 627 599 psImageFree(img2); 628 600 629 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {630 psAbort(__func__,"Memory Leaks!");631 }632 psMemCheckCorruption(1);633 634 601 return 0; 635 602 } … … 642 609 psF32 min; 643 610 psF32 max; 644 int currentId = psMemGetId();645 611 int numClipped = 0; 646 612 int retVal; … … 740 706 } 741 707 742 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {743 psAbort(__func__,"Memory Leaks!");744 }745 psMemCheckCorruption(1);746 747 708 return 0; 748 709 } … … 753 714 unsigned int c = 128; 754 715 unsigned int r = 256; 755 int currentId = psMemGetId();756 716 int numClipped = 0; 757 717 int retVal; … … 825 785 } 826 786 827 828 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {829 psAbort(__func__,"Memory Leaks!");830 }831 psMemCheckCorruption(1);832 833 787 return 0; 834 788 }
Note:
See TracChangeset
for help on using the changeset viewer.
