Changeset 4558
- Timestamp:
- Jul 14, 2005, 4:40:20 PM (21 years ago)
- Location:
- trunk/psLib/test
- Files:
-
- 4 edited
-
db/tst_psDB.c (modified) (2 diffs)
-
fits/tst_psFits.c (modified) (2 diffs)
-
imageops/tst_psImageGeomManip.c (modified) (3 diffs)
-
types/Makefile.am (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/db/tst_psDB.c
r4550 r4558 9 9 * @author Aaron Culliney, MHPCC 10 10 * 11 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-07-1 3 11:14:58$11 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-07-15 02:40:20 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1600 1600 return 3; 1601 1601 } 1602 if(meta->list-> size!= 6) {1602 if(meta->list->n != 6) { 1603 1603 psError(PS_ERR_UNKNOWN,true,"Number of cols = %d not as expected %d", 1604 meta->list-> size,6);1604 meta->list->n,6); 1605 1605 psDBDropTable(dbh,table); 1606 1606 psDBCleanup(dbh); -
trunk/psLib/test/fits/tst_psFits.c
r4550 r4558 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-07-1 3 11:14:59$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-07-15 02:40:20 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 650 650 } 651 651 652 if (header->list-> size < 1 || header->list->size != header2->list->size) {652 if (header->list->n < 1 || header->list->n != header2->list->n) { 653 653 psError(PS_ERR_UNKNOWN, true, 654 654 "Reading the header given a NULL input psMetadata differed " -
trunk/psLib/test/imageops/tst_psImageGeomManip.c
r4547 r4558 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-07-1 3 02:47:00 $8 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-07-15 02:40:20 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1085 1085 1086 1086 psImage* in = psImageAlloc(cols,rows,PS_TYPE_F32); 1087 psImage* mask = psImageAlloc(cols,rows,PS_TYPE_MASK);1088 1087 for (psS32 row=0;row<rows;row++) { 1089 1088 psF32* inRow = in->data.F32[row]; 1090 psMaskType* maskRow = mask->data.PS_TYPE_MASK_DATA[row];1091 1089 for (psS32 col=0;col<cols;col++) { 1092 1090 inRow[col] = (psF32)row+(psF32)col/1000.0f; 1093 maskRow[col] = 0; 1094 } 1095 } 1096 1097 1098 // ********** check psImageTransform with minimum specified inputs. 1091 } 1092 } 1099 1093 1100 1094 psImage* out = psImageTransform(NULL, … … 1144 1138 } 1145 1139 1146 // zero out buffer1147 memset(out->rawDataBuffer, 0, sizeof(psF32)*out->numRows*out->numCols);1148 1149 psPixels* blanks = psPixelsAlloc(10);1150 psPixels* mask = psPixelsAlloc(10);1151 1152 // perform the same transform, but this time, supply a psImage to recycle and a mask1153 out = psImageTransform(out,1154 blanks,1155 in,1156 mask,1157 1,1158 trans,1159 psRegionSet(0,0,0,0),1160 NULL,1161 PS_INTERPOLATE_FLAT,1162 -1);1163 1164 if (out == NULL) {1165 psError(PS_ERR_UNKNOWN, false,1166 "out == NULL");1167 return 1;1168 }1169 if (out->type.type != PS_TYPE_F32) {1170 psError(PS_ERR_UNKNOWN, false,1171 "out->type.type != PS_TYPE_F32, out->type.type == %d",1172 out->type.type);1173 return 2;1174 }1175 if (out->numRows != rows*2 || out->numCols != cols*2) {1176 psError(PS_ERR_UNKNOWN, false,1177 "out size is %dx%d, not %dx%d",1178 out->numCols, out->numRows, cols*2, rows);1179 return 3;1180 }1181 1182 for (psS32 row=0;row<out->numRows;row++) {1183 psF32* outRow = out->data.F32[row];1184 for (psS32 col=0;col<cols;col++) {1185 float inValue = p_psImagePixelInterpolateFLAT_F32(in,1186 col*trans->x->coeff[1][0]+trans->x->coeff[0][0],1187 row*trans->y->coeff[0][1]+trans->y->coeff[0][0],1188 NULL, 0,1189 -1);1190 if (fabsf(outRow[col] - inValue) > FLT_EPSILON*10) {1191 psError(PS_ERR_UNKNOWN, false,1192 "out at %d,%d was %g, expected %g",1193 col,row,outRow[col], inValue);1194 return 4;1195 }1196 }1197 }1198 1199 1200 1140 psFree(out); 1201 1141 psFree(in); -
trunk/psLib/test/types/Makefile.am
r4549 r4558 2 2 # 3 3 AM_LDFLAGS = -L$(top_builddir)/src -lpslib $(PSLIB_LIBS) 4 AM_CFLAGS = -DXML_CONFIG_FILE="\"$(top_srcdir)/etc/pslib/psTime.xml\"" 4 5 5 6 TESTS = \
Note:
See TracChangeset
for help on using the changeset viewer.
