Changeset 1924 for trunk/psLib/test/image/tst_psImageExtraction.c
- Timestamp:
- Sep 28, 2004, 3:10:27 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/image/tst_psImageExtraction.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImageExtraction.c
r1797 r1924 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-09- 11 02:55:29$8 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-09-29 01:10:27 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 20 21 21 testDescription tests[] = { 22 { 23 testImageSlice, 552, "psImageSlice", 0, false 24 }, 25 { 26 NULL 27 } 22 {testImageSlice, 552, "psImageSlice", 0, false}, 23 {NULL} 28 24 }; 29 25 … … 72 68 73 69 #define PSIMAGESLICE_TEST1(M,N,DIRECTION,TRUTH_SIZE,TRUTHPIX_X,TRUTHPIX_Y,TESTNUM) \ 74 out = psImageSlice(out,positions,image,mask,1,c/10,r/10, M,N,DIRECTION,stat); \70 out = psImageSlice(out,positions,image,mask,1,c/10,r/10,c/10+M,r/10+N,DIRECTION,stat); \ 75 71 \ 76 72 if (out->n != TRUTH_SIZE) { \ … … 136 132 */ 137 133 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 138 out = psImageSlice( out, NULL, NULL, NULL, 0, c / 10, r / 10, 1, 1, PS_CUT_X_POS, stat ); 134 out = psImageSlice( out, 135 NULL, NULL, 136 NULL, 0, 137 c/10, r/10, 138 c/10 + 1, r/10 + 1, 139 PS_CUT_X_POS, 140 stat ); 139 141 if ( out != NULL ) { 140 142 psError( __func__, "Giving a NULL image, psImageSlice didn't return NULL as expected" ); … … 148 150 */ 149 151 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 150 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r / 10, 1, 1, PS_CUT_X_POS, NULL ); 152 out = psImageSlice( out, 153 NULL, image, 154 mask, 1, 155 c/10, r/10, 156 c/10 + 1, 157 r/10 + 1, 158 PS_CUT_X_POS, 159 NULL ); 151 160 if ( out != NULL ) { 152 161 psError( __func__, "Giving a NULL stat struct, psImageSlice didn't return NULL as expected" ); … … 161 170 */ 162 171 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 163 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r / 10, 1, 1, 5, stat ); 172 out = psImageSlice( out, NULL, 173 image, 174 mask, 1, 175 c/10, r/10, 176 c/10+1, r/10+1, 177 5, 178 stat); 164 179 if ( out != NULL ) { 165 180 psError( __func__, "Giving a bogus direction flag, psImageSlice didn't return NULL as expected" ); … … 172 187 */ 173 188 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 174 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r / 10, 0, 0, PS_CUT_X_POS, stat ); 189 out = psImageSlice( out, 190 NULL, 191 image, 192 mask, 1, 193 c/10, r/10, 194 c/10, r/10, 195 PS_CUT_X_POS, 196 stat ); 175 197 if ( out != NULL ) { 176 198 psError( __func__, "Giving a 0x0 region, psImageSlice didn't return NULL as expected" ); … … 184 206 */ 185 207 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 186 out = psImageSlice( out, NULL, image, mask, 1, c + 1, r / 10, 1, 1, PS_CUT_X_POS, stat ); 208 out = psImageSlice( out, NULL, 209 image, 210 mask, 1, 211 c+1, r/10, 212 c+2, r/10+10, 213 PS_CUT_X_POS, 214 stat ); 187 215 if ( out != NULL ) { 188 216 psError( __func__, "Giving an invalid x position, psImageSlice didn't return NULL as expected" ); … … 191 219 192 220 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 193 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r + 1, 1, 1, PS_CUT_X_POS, stat ); 221 out = psImageSlice( out, NULL, 222 image, 223 mask, 1, 224 c/10, r+1, 225 c/10+1,r+5, 226 PS_CUT_X_POS, 227 stat ); 194 228 if ( out != NULL ) { 195 229 psError( __func__, "Giving an invalid y position, psImageSlice didn't return NULL as expected" ); … … 198 232 199 233 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 200 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r / 10, c, 1, PS_CUT_X_POS, stat ); 234 out = psImageSlice( out, NULL, 235 image, 236 mask, 1, 237 c/10, r/10, 238 c+1, r/10+1, 239 PS_CUT_X_POS, 240 stat); 201 241 if ( out != NULL ) { 202 242 psError( __func__, "Giving an invalid numCols, psImageSlice didn't return NULL as expected" ); … … 205 245 206 246 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 207 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r / 10, 1, r, PS_CUT_X_POS, stat ); 247 out = psImageSlice( out, NULL, 248 image, 249 mask, 1, 250 c/10, r/10, 251 c/10+1, r + 1, 252 PS_CUT_X_POS, 253 stat); 208 254 if ( out != NULL ) { 209 255 psError( __func__, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" ); … … 218 264 psLogMsg( __func__, PS_LOG_INFO, "Following should be an error." ); 219 265 stat->options = 0; 220 out = psImageSlice( out, NULL, image, mask, 1, c / 10, r / 10, 1, 1, PS_CUT_X_POS, stat ); 266 out = psImageSlice( out, NULL, 267 image, 268 mask, 1, 269 c/10, r/10, 270 c/10+1, r/10+1, 271 PS_CUT_X_POS, 272 stat); 221 273 if ( out != NULL ) { 222 274 psError( __func__, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
Note:
See TracChangeset
for help on using the changeset viewer.
