- Timestamp:
- Oct 12, 2004, 9:18:20 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic03.c
r2021 r2053 15 15 * @author Ross Harman, MHPCC 16 16 * 17 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-10- 08 02:48:01$17 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 18 * @date $Date: 2004-10-12 19:18:20 $ 19 19 * 20 20 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 214 214 printFooter(stdout, "psMatrixVectorArithmetic", "Invalid operation", true); 215 215 216 // Invalid parameter in2 217 printNegativeTestHeader(stdout,"psMatrixVectorArithmetic","Invalid input", 218 "Invalid operation", 0); 219 CREATE_AND_SET_VECTOR(vector4,F64,0,3); 220 CREATE_AND_SET_VECTOR(vector5,F64,0,3); 221 CREATE_AND_SET_VECTOR(vector6,F64,0,3); 222 if ( psBinaryOp(vector6,vector4,"+",NULL) != NULL ) { 223 psError(__func__,"psBinaryOp should return null when out and in1 valid but in2 null."); 224 return 10; 225 } 226 printFooter(stdout, "psMatrixVectorArithmetic", "Invalid input", true); 227 228 vector4->type.dimen = PS_DIMEN_OTHER; 229 if ( psBinaryOp(NULL,vector4,"+",vector5) != NULL) { 230 psError(__func__,"psBinaryOp should return null when input dimen PS_DIMEN_OTHER."); 231 return 11; 232 } 233 vector4->type.dimen = PS_DIMEN_VECTOR; 234 235 psScalar* inScalar = psScalarAlloc(0,PS_TYPE_F64); 236 CREATE_AND_SET_IMAGE(image10,F64,0,3,3); 237 if ( psBinaryOp(image10,inScalar,"+",vector4) == NULL ) { 238 psError(__func__,"psBinaryOp should not return null when input/out dimension don't match."); 239 return 12; 240 } 241 242 psFree(vector4); 243 psFree(vector5); 244 216 245 return 0; 217 246 }
Note:
See TracChangeset
for help on using the changeset viewer.
