Changeset 3682 for trunk/psLib/test/image
- Timestamp:
- Apr 7, 2005, 10:27:42 AM (21 years ago)
- Location:
- trunk/psLib/test/image
- Files:
-
- 11 edited
-
tst_psImage.c (modified) (4 diffs)
-
tst_psImageConvolve.c (modified) (2 diffs)
-
tst_psImageExtraction.c (modified) (2 diffs)
-
tst_psImageFFT.c (modified) (2 diffs)
-
tst_psImageIO.c (modified) (2 diffs)
-
tst_psImageInterpolate.c (modified) (3 diffs)
-
tst_psImageManip.c (modified) (3 diffs)
-
tst_psImageStats.c (modified) (1 diff)
-
verified/tst_psImage.stderr (modified) (1 diff)
-
verified/tst_psImageInterpolate.stderr (modified) (1 diff)
-
verified/tst_psImageManip.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImage.c
r3264 r3682 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 2-17 19:26:25$8 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 18 18 19 19 #include "psTest.h" 20 #include "pslib .h"20 #include "pslib_strict.h" 21 21 #include "psType.h" 22 22 … … 51 51 0,1,100,1,150,100 52 52 }; 53 psU32 types = 1 3;53 psU32 types = 12; 54 54 psElemType type[] = { PS_TYPE_S8, PS_TYPE_S16, PS_TYPE_S32, PS_TYPE_S64, 55 55 PS_TYPE_U8, PS_TYPE_U16, PS_TYPE_U32, PS_TYPE_U64, 56 PS_TYPE_F32, PS_TYPE_F64, PS_TYPE_C32, PS_TYPE_C64, 57 PS_TYPE_PTR }; 56 PS_TYPE_F32, PS_TYPE_F64, PS_TYPE_C32, PS_TYPE_C64}; 58 57 59 58 psLogMsg(__func__,PS_LOG_INFO,"#546 - psImageAlloc shall allocate memory for a psImage structure"); … … 193 192 } 194 193 } 195 }196 break;197 case PS_TYPE_PTR: {198 psU32 rows = numRows[i];199 psU32 cols = numCols[i];200 psImage* temp = psImageAlloc(1,1,PS_TYPE_F32);201 202 for (psS32 r=0;r<rows;r++) {203 for (psS32 c=0;c<cols;c++) {204 image->data.PTR[r][c] = psMemIncrRefCounter(temp);205 }206 }207 for (psS32 r=0;r<rows;r++) {208 for (psS32 c=0;c<cols;c++) {209 if (image->data.PTR[r][c] != temp) {210 psError(PS_ERR_UNKNOWN, true, "Could not set pixel in pointer image at (%d,%d): %x %x",211 c,r,image->data.PTR[r][c],temp);212 psFree(image);213 psFree(temp);214 return 8;215 }216 }217 }218 psFree(temp);219 194 } 220 195 break; -
trunk/psLib/test/image/tst_psImageConvolve.c
r2911 r3682 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 1-05 21:16:15$7 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-04-07 20:27:42 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 17 17 18 18 #include "psTest.h" 19 #include "pslib .h"19 #include "pslib_strict.h" 20 20 #include "psType.h" 21 21 -
trunk/psLib/test/image/tst_psImageExtraction.c
r3311 r3682 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 2-23 21:36:57$8 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 15 15 16 16 #include "psTest.h" 17 #include "pslib .h"17 #include "pslib_strict.h" 18 18 #include "psType.h" 19 19 -
trunk/psLib/test/image/tst_psImageFFT.c
r3264 r3682 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 2-17 19:26:25$8 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 16 16 17 17 #include "psTest.h" 18 #include "pslib .h"18 #include "pslib_strict.h" 19 19 20 20 #define GENIMAGE(img,c,r,TYP, valueFcn) \ -
trunk/psLib/test/image/tst_psImageIO.c
r3264 r3682 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 2-17 19:26:25$8 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 22 22 #include "psTest.h" 23 #include "pslib .h"23 #include "pslib_strict.h" 24 24 25 25 #define GENIMAGE(img,c,r,TYP, valueFcn) \ -
trunk/psLib/test/image/tst_psImageInterpolate.c
r3446 r3682 5 5 * @author Eric Van Alst, MHPCC 6 6 * 7 * @version $Revision: 1. 5$7 * @version $Revision: 1.6 $ 8 8 * $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-0 3-18 02:35:15$9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 14 14 15 15 #include "psTest.h" 16 #include "pslib .h"16 #include "pslib_strict.h" 17 17 18 18 #define GENIMAGE(img,c,r,TYP,valueFcn) \ … … 100 100 101 101 // Perform interpolation with invalid input image type 102 img1 = psImageAlloc(10,10,PS_TYPE_ PTR);102 img1 = psImageAlloc(10,10,PS_TYPE_BOOL); 103 103 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message"); 104 104 val = psImagePixelInterpolate(img1,1.2,1.2,NULL,0,10.0,PS_INTERPOLATE_FLAT); -
trunk/psLib/test/image/tst_psImageManip.c
r3446 r3682 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.4 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-0 3-18 02:35:15$8 * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-04-07 20:27:42 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 22 22 23 23 #include "psTest.h" 24 #include "pslib .h"24 #include "pslib_strict.h" 25 25 #include "psType.h" 26 26 … … 1788 1788 // Verify that that an invalid image type is handled properly 1789 1789 psErrorClear(); 1790 psImage* invImage = psImageAlloc(cols,rows,PS_TYPE_ PTR);1791 memset(invImage->rawDataBuffer,0,cols*rows*sizeof(ps Ptr)); // make sure the image is of all NULLs1790 psImage* invImage = psImageAlloc(cols,rows,PS_TYPE_BOOL); 1791 memset(invImage->rawDataBuffer,0,cols*rows*sizeof(psBool)); // make sure the image is of all NULLs 1792 1792 result = psImageResample(result,invImage,2,PS_INTERPOLATE_FLAT); 1793 1793 if (result != NULL) { -
trunk/psLib/test/image/tst_psImageStats.c
r3310 r3682 15 15 #include <math.h> 16 16 17 #include "pslib .h"17 #include "pslib_strict.h" 18 18 #include "psTest.h" 19 19 -
trunk/psLib/test/image/verified/tst_psImage.stderr
r3127 r3682 79 79 <DATE><TIME>|<HOST>|E|psImageAlloc (FILE:LINENO) 80 80 Specified number of rows (0) or columns (0) is invalid. 81 <DATE><TIME>|<HOST>|I|testImageAlloc82 Testing psImage with type 0h83 <DATE><TIME>|<HOST>|I|testImageAlloc84 Following should be an error.85 <DATE><TIME>|<HOST>|E|psImageAlloc (FILE:LINENO)86 Specified number of rows (0) or columns (0) is invalid.87 81 88 82 ---> TESTPOINT PASSED (psImage{psImageAlloc} | tst_psImage.c) -
trunk/psLib/test/image/verified/tst_psImageInterpolate.stderr
r3127 r3682 21 21 Following should generate an error message 22 22 <DATE><TIME>|<HOST>|E|psImagePixelInterpolate (FILE:LINENO) 23 Specified psImage type, ps Ptr, is not supported.23 Specified psImage type, psBool, is not supported. 24 24 <DATE><TIME>|<HOST>|I|testInterpolateError 25 25 Following should generate an error message 26 26 <DATE><TIME>|<HOST>|E|psImagePixelInterpolate (FILE:LINENO) 27 Specified psImage type, ps Ptr, is not supported.27 Specified psImage type, psBool, is not supported. 28 28 29 29 ---> TESTPOINT PASSED (psImagePixelInterpolate{psImagePixelInterpolate} | tst_psImageInterpolate.c) -
trunk/psLib/test/image/verified/tst_psImageManip.stderr
r3446 r3682 424 424 Specified interpolation mode, -1, is unsupported. 425 425 <DATE><TIME>|<HOST>|E|psImageResample (FILE:LINENO) 426 Specified psImage type, ps Ptr, is not supported.426 Specified psImage type, psBool, is not supported. 427 427 428 428 ---> TESTPOINT PASSED (psImage{psImageResample} | tst_psImageManip.c)
Note:
See TracChangeset
for help on using the changeset viewer.
