Changeset 4102
- Timestamp:
- Jun 3, 2005, 12:45:51 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmObjects01.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmObjects01.c
r4097 r4102 19 19 * abd never deallocate, no error is generated. 20 20 * 21 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $22 * @date $Date: 2005-06-03 2 1:43:17$21 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2005-06-03 22:45:51 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 {test03, 001, "pmObjects: pmCullPeaks()", true, false}, 50 50 {test04, 001, "pmObjects: pmSourceLocalSky()", true, false}, 51 {test06, 001, "pmObjects: pmSourceSetPixel Circle()", true, false},51 {test06, 001, "pmObjects: pmSourceSetPixelsCircle()", true, false}, 52 52 {test05, 001, "pmObjects: pmSourceMoments()", true, false}, 53 53 {test07, 001, "pmObjects: pmMin()", true, false}, … … 1101 1101 1102 1102 printf("----------------------------------------------------------------------------------\n"); 1103 printf("Calling pmSourceSetPixel Circle with NULL psSource. Should generate error and return NULL.\n");1104 rc = pmSourceSetPixel Circle(NULL, imgData, 10.0);1103 printf("Calling pmSourceSetPixelsCircle with NULL psSource. Should generate error and return NULL.\n"); 1104 rc = pmSourceSetPixelsCircle(NULL, imgData, 10.0); 1105 1105 if (rc == true) { 1106 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1106 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1107 1107 testStatus = false; 1108 1108 } … … 1110 1110 1111 1111 printf("----------------------------------------------------------------------------------\n"); 1112 printf("Calling pmSourceSetPixel Circle with NULL psImage. Should generate error and return NULL.\n");1113 rc = pmSourceSetPixel Circle(tmpSource, NULL, 10.0);1112 printf("Calling pmSourceSetPixelsCircle with NULL psImage. Should generate error and return NULL.\n"); 1113 rc = pmSourceSetPixelsCircle(tmpSource, NULL, 10.0); 1114 1114 if (rc == true) { 1115 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1116 testStatus = false; 1117 } 1118 1119 printf("----------------------------------------------------------------------------------\n"); 1120 printf("Calling pmSourceSetPixel Circle with wrong type psImage. Should generate error and return NULL.\n");1121 rc = pmSourceSetPixel Circle(tmpSource, imgDataF64, 10.0);1115 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1116 testStatus = false; 1117 } 1118 1119 printf("----------------------------------------------------------------------------------\n"); 1120 printf("Calling pmSourceSetPixelsCircle with wrong type psImage. Should generate error and return NULL.\n"); 1121 rc = pmSourceSetPixelsCircle(tmpSource, imgDataF64, 10.0); 1122 1122 if (rc == true) { 1123 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1124 testStatus = false; 1125 } 1126 1127 printf("----------------------------------------------------------------------------------\n"); 1128 printf("Calling pmSourceSetPixel Circle with radius < 0.0. Should generate error and return NULL.\n");1129 rc = pmSourceSetPixel Circle(tmpSource, imgData, -10.0);1123 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1124 testStatus = false; 1125 } 1126 1127 printf("----------------------------------------------------------------------------------\n"); 1128 printf("Calling pmSourceSetPixelsCircle with radius < 0.0. Should generate error and return NULL.\n"); 1129 rc = pmSourceSetPixelsCircle(tmpSource, imgData, -10.0); 1130 1130 if (rc == true) { 1131 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1131 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1132 1132 testStatus = false; 1133 1133 } … … 1135 1135 /* XXX: Commented away since the EAM mods no longer produced errors. 1136 1136 printf("----------------------------------------------------------------------------------\n"); 1137 printf("Calling pmSourceSetPixel Circle with subImage startCol < 0. Should generate error and return NULL.\n");1137 printf("Calling pmSourceSetPixelsCircle with subImage startCol < 0. Should generate error and return NULL.\n"); 1138 1138 tmpSource->peak->x = (psF32) (TST06_NUM_ROWS / 2); 1139 1139 tmpSource->peak->y = (psF32) (TST06_NUM_COLS / 2); 1140 1140 tmpSource->peak->x = 1; 1141 rc = pmSourceSetPixel Circle(tmpSource, imgData, 10.0);1141 rc = pmSourceSetPixelsCircle(tmpSource, imgData, 10.0); 1142 1142 if (rc == true) { 1143 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1143 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1144 1144 testStatus = false; 1145 1145 } 1146 1146 1147 1147 printf("----------------------------------------------------------------------------------\n"); 1148 printf("Calling pmSourceSetPixel Circle with subImage endCol > numCols. Should generate error and return NULL.\n");1148 printf("Calling pmSourceSetPixelsCircle with subImage endCol > numCols. Should generate error and return NULL.\n"); 1149 1149 tmpSource->peak->x = (psF32) (TST06_NUM_ROWS / 2); 1150 1150 tmpSource->peak->y = (psF32) (TST06_NUM_COLS / 2); 1151 1151 tmpSource->peak->x = TST06_NUM_COLS; 1152 rc = pmSourceSetPixel Circle(tmpSource, imgData, 10.0);1152 rc = pmSourceSetPixelsCircle(tmpSource, imgData, 10.0); 1153 1153 if (rc == true) { 1154 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1154 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1155 1155 testStatus = false; 1156 1156 } 1157 1157 1158 1158 printf("----------------------------------------------------------------------------------\n"); 1159 printf("Calling pmSourceSetPixel Circle with subImage startRow < 0. Should generate error and return NULL.\n");1159 printf("Calling pmSourceSetPixelsCircle with subImage startRow < 0. Should generate error and return NULL.\n"); 1160 1160 tmpSource->peak->x = (psF32) (TST06_NUM_ROWS / 2); 1161 1161 tmpSource->peak->y = (psF32) (TST06_NUM_COLS / 2); 1162 1162 tmpSource->peak->y = 1; 1163 rc = pmSourceSetPixel Circle(tmpSource, imgData, 10.0);1163 rc = pmSourceSetPixelsCircle(tmpSource, imgData, 10.0); 1164 1164 if (rc == true) { 1165 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1165 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1166 1166 testStatus = false; 1167 1167 } 1168 1168 1169 1169 printf("----------------------------------------------------------------------------------\n"); 1170 printf("Calling pmSourceSetPixel Circle with subImage endRow > numRows. Should generate error and return NULL.\n");1170 printf("Calling pmSourceSetPixelsCircle with subImage endRow > numRows. Should generate error and return NULL.\n"); 1171 1171 tmpSource->peak->x = (psF32) (TST06_NUM_ROWS / 2); 1172 1172 tmpSource->peak->y = (psF32) (TST06_NUM_COLS / 2); 1173 1173 tmpSource->peak->y = TST06_NUM_ROWS; 1174 rc = pmSourceSetPixel Circle(tmpSource, imgData, 10.0);1174 rc = pmSourceSetPixelsCircle(tmpSource, imgData, 10.0); 1175 1175 if (rc == true) { 1176 printf("TEST ERROR: pmSourceSetPixel Circle() returned TRUE.\n");1176 printf("TEST ERROR: pmSourceSetPixelsCircle() returned TRUE.\n"); 1177 1177 testStatus = false; 1178 1178 } 1179 1179 */ 1180 1180 printf("----------------------------------------------------------------------------------\n"); 1181 printf("Calling pmSourceSetPixel Circle with valid data.\n");1181 printf("Calling pmSourceSetPixelsCircle with valid data.\n"); 1182 1182 tmpSource->peak->x = (psF32) (TST06_NUM_ROWS / 2); 1183 1183 tmpSource->peak->y = (psF32) (TST06_NUM_COLS / 2); 1184 rc = pmSourceSetPixel Circle(tmpSource, imgData, 10.0);1184 rc = pmSourceSetPixelsCircle(tmpSource, imgData, 10.0); 1185 1185 1186 1186 if (rc == false) { 1187 printf("TEST ERROR: pmSourceSetPixel Circle() returned FALSE.\n");1187 printf("TEST ERROR: pmSourceSetPixelsCircle() returned FALSE.\n"); 1188 1188 testStatus = false; 1189 1189 } else { 1190 // XXX: Test correctness of the various psSetPixel Circle members.1190 // XXX: Test correctness of the various psSetPixelsCircle members. 1191 1191 } 1192 1192
Note:
See TracChangeset
for help on using the changeset viewer.
