Changeset 6750 for trunk/psLib/test/imageops
- Timestamp:
- Mar 31, 2006, 4:43:57 PM (20 years ago)
- Location:
- trunk/psLib/test/imageops
- Files:
-
- 5 edited
-
tst_psImagePixelExtract.c (modified) (5 diffs)
-
tst_psImageStats.c (modified) (3 diffs)
-
verified/tst_psImageInterpolate.stderr (modified) (1 diff)
-
verified/tst_psImagePixelExtract.stderr (modified) (3 diffs)
-
verified/tst_psImageStats.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tst_psImagePixelExtract.c
r6484 r6750 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 2-24 23:43:15$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-01 02:43:57 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 static psS32 testImageCut(void); 22 22 static psS32 testImageRadialCut(void); 23 static psS32 testImageRowColError(void); 23 24 static psS32 testImageRowColF32(void); 24 25 static psS32 testImageRowColF64(void); … … 37 38 {testImageSlice, 552, "psImageSlice", 0, false}, 38 39 {testImageCut, 555, "psImageCut", 0, false}, 39 {testImageRadialCut, 557, "psImageRadialCut", 0, false}, 40 {testImageRadialCut, 556, "psImageRadialCut", 0, false}, 41 {testImageRowColError, 557, "testImageRowColError", 0, false}, 40 42 {testImageRowColF32, 558, "psImageRowColF32", 0, false}, 41 43 {testImageRowColF64, 559, "psImageRowColF64", 0, false}, … … 765 767 } 766 768 767 psS32 testImageRowColF64(void) 768 { 769 psVector *rowcol = NULL; 770 psVector *empty = NULL; 769 psS32 testImageRowColError(void) 770 { 771 771 psImage *image = NULL; 772 psImage *emptyImage = NULL; 772 psVector *out = NULL; 773 int num = 0; 774 775 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 776 out = psImageRow(NULL, image, num); 777 if (out != NULL) { 778 return 1; 779 } 780 773 781 774 782 image = psImageAlloc(3, 3, PS_TYPE_F64); 775 rowcol = psVectorAlloc(3, PS_TYPE_F64);776 783 *(psS32*)&(image->row0) = 5; 784 *(psS32*)&(image->col0) = 10; 777 785 image->data.F64[0][0] = 666.666; 778 786 image->data.F64[1][0] = 66.6; … … 785 793 image->data.F64[2][2] = 66.66; 786 794 795 796 797 psFree(out); 798 psFree(image); 799 return 0; 800 } 801 802 psS32 testImageRowColF64(void) 803 { 804 psVector *rowcol = NULL; 805 psVector *empty = NULL; 806 psImage *image = NULL; 807 psImage *emptyImage = NULL; 808 809 image = psImageAlloc(3, 3, PS_TYPE_F64); 810 rowcol = psVectorAlloc(3, PS_TYPE_F64); 811 812 image->data.F64[0][0] = 666.666; 813 image->data.F64[1][0] = 66.6; 814 image->data.F64[2][0] = 6.66; 815 image->data.F64[0][1] = 6.6; 816 image->data.F64[1][1] = 6.666; 817 image->data.F64[2][1] = 66.666; 818 image->data.F64[0][2] = 666.6; 819 image->data.F64[1][2] = 666.66; 820 image->data.F64[2][2] = 66.66; 821 787 822 //Test for error with NULL image 788 823 empty = psImageCol(empty, emptyImage, 0); -
trunk/psLib/test/imageops/tst_psImageStats.c
r6306 r6750 543 543 psRegion reg; 544 544 reg.x0 = 0; 545 reg.x1 = 1;545 reg.x1 = 0; 546 546 reg.y0 = 0; 547 reg.y1 = 5; 547 reg.y1 = 4; 548 549 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 548 550 numPix = psImageCountPixelMask(in, reg, 1); 549 550 551 if (numPix != -1) { 551 552 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 587 588 if (numPix2 != 2) { 588 589 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 589 "psImageCountPixelMask returned incorrect pixel count %ld \n", numPix2);590 "psImageCountPixelMask returned incorrect pixel count %ld (!=2)\n", numPix2); 590 591 return 4; 591 592 } … … 613 614 reg.x1 = 1; 614 615 reg.y1 = 1; 616 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 615 617 numPix2 = psImageCountPixelMask(in2, reg, 1); 616 618 if (numPix2 != -1) { -
trunk/psLib/test/imageops/verified/tst_psImageInterpolate.stderr
r4547 r6750 17 17 Following should generate an error message 18 18 <DATE><TIME>|<HOST>|E|psImagePixelInterpolate (FILE:LINENO) 19 Can not operate on a NULL psImage.19 Unallowable operation: psImage input or its data is NULL. 20 20 <DATE><TIME>|<HOST>|I|testInterpolateError 21 21 Following should generate an error message -
trunk/psLib/test/imageops/verified/tst_psImagePixelExtract.stderr
r6631 r6750 24 24 Following should be an error. 25 25 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 26 Specified psRegion parameter, x0=301.000000, is out of range [0, 300].27 <DATE><TIME>|<HOST>|I|testImageSlice 28 Following should be an error. 29 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 30 Specified psRegion parameter, y0=201.000000, is out of range [0, 200].31 <DATE><TIME>|<HOST>|I|testImageSlice 32 Following should be an error. 33 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 34 Specified psRegion parameter, x1=301.000000=301, is out of range [0, 300].35 <DATE><TIME>|<HOST>|I|testImageSlice 36 Following should be an error. 37 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 38 Specified psRegion parameter, y1=201.000000=201, is out of range [0, 200].26 Specified psRegion parameter, x0=301.000000, is out of range [0,299]. 27 <DATE><TIME>|<HOST>|I|testImageSlice 28 Following should be an error. 29 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 30 Specified psRegion parameter, y0=201.000000, is out of range [0,199]. 31 <DATE><TIME>|<HOST>|I|testImageSlice 32 Following should be an error. 33 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 34 Specified psRegion parameter, x1=301.000000=301, is out of range [0,299]. 35 <DATE><TIME>|<HOST>|I|testImageSlice 36 Following should be an error. 37 <DATE><TIME>|<HOST>|E|psImageSlice (FILE:LINENO) 38 Specified psRegion parameter, y1=201.000000=201, is out of range [0,199]. 39 39 <DATE><TIME>|<HOST>|I|testImageSlice 40 40 Following should be an error. … … 61 61 The following should be an error. 62 62 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 63 Specified line, (-1.000000,10.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 64 <DATE><TIME>|<HOST>|I|testImageCut 65 The following should be an error. 66 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 67 Specified line, (300.000000,10.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 68 <DATE><TIME>|<HOST>|I|testImageCut 69 The following should be an error. 70 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 71 Specified line, (20.000000,10.000000)->(-1.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 72 <DATE><TIME>|<HOST>|I|testImageCut 73 The following should be an error. 74 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 75 Specified line, (20.000000,10.000000)->(300.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 76 <DATE><TIME>|<HOST>|I|testImageCut 77 The following should be an error. 78 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 79 Specified line, (20.000000,-1.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 80 <DATE><TIME>|<HOST>|I|testImageCut 81 The following should be an error. 82 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 83 Specified line, (20.000000,200.000000)->(240.000000,180.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 84 <DATE><TIME>|<HOST>|I|testImageCut 85 The following should be an error. 86 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 87 Specified line, (20.000000,10.000000)->(240.000000,-1.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 88 <DATE><TIME>|<HOST>|I|testImageCut 89 The following should be an error. 90 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 91 Specified line, (20.000000,10.000000)->(240.000000,200.000000), does not entirely lie in psImage's boundaries, [0:299,0:199]. 63 Specified psRegion parameter, x0=-1.000000, is out of range [0,300]. 64 <DATE><TIME>|<HOST>|I|testImageCut 65 The following should be an error. 66 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 67 Specified psRegion parameter, x0=300.000000, is out of range [0,300]. 68 <DATE><TIME>|<HOST>|I|testImageCut 69 The following should be an error. 70 <DATE><TIME>|<HOST>|I|testImageCut 71 The following should be an error. 72 <DATE><TIME>|<HOST>|I|testImageCut 73 The following should be an error. 74 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 75 Specified psRegion parameter, y0=-1.000000, is out of range [0,200]. 76 <DATE><TIME>|<HOST>|I|testImageCut 77 The following should be an error. 78 <DATE><TIME>|<HOST>|E|psImageCut (FILE:LINENO) 79 Specified psRegion parameter, y0=200.000000, is out of range [0,200]. 80 <DATE><TIME>|<HOST>|I|testImageCut 81 The following should be an error. 82 <DATE><TIME>|<HOST>|I|testImageCut 83 The following should be an error. 92 84 <DATE><TIME>|<HOST>|I|testImageCut 93 85 Following should be an error (NULL image). … … 148 140 /***************************** TESTPOINT ******************************************\ 149 141 * TestFile: tst_psImagePixelExtract.c * 142 * TestPoint: psImage{testImageRowColError} * 143 * TestType: Positive * 144 \**********************************************************************************/ 145 146 <DATE><TIME>|<HOST>|I|testImageRowColError 147 Following should generate error message 148 <DATE><TIME>|<HOST>|E|psImageRow (FILE:LINENO) 149 Can not operate on a NULL psImage. 150 151 ---> TESTPOINT PASSED (psImage{testImageRowColError} | tst_psImagePixelExtract.c) 152 153 /***************************** TESTPOINT ******************************************\ 154 * TestFile: tst_psImagePixelExtract.c * 150 155 * TestPoint: psImage{psImageRowColF32} * 151 156 * TestType: Positive * -
trunk/psLib/test/imageops/verified/tst_psImageStats.stderr
r5839 r6750 622 622 \**********************************************************************************/ 623 623 624 <HOST>|I|testImageCountPixel 625 Following should generate error message 624 626 <HOST>|E|psImageCountPixelMask (FILE:LINENO) 625 Can not operate on a NULL psImage. 627 Unallowable operation: psImage mask or its data is NULL. 628 <HOST>|I|testImageCountPixel 629 Following should generate error message 626 630 <HOST>|E|psImageCountPixelMask (FILE:LINENO) 627 psRegion input contains 0 pixels631 Specified psRegion parameter, x0=1.000000, is out of range [0,0]. 628 632 629 633 ---> TESTPOINT PASSED (psImage{psImageCountPixel} | tst_psImageStats.c)
Note:
See TracChangeset
for help on using the changeset viewer.
