Changeset 2967 for trunk/psLib/test/dataIO/tst_psFits.c
- Timestamp:
- Jan 12, 2005, 4:08:30 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/dataIO/tst_psFits.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataIO/tst_psFits.c
r2965 r2967 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-01-13 0 1:54:26$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-01-13 02:08:30 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 16 16 17 17 #include <unistd.h> 18 #include <string.h> 18 19 19 20 static bool makeMulti(void); … … 21 22 22 23 static psS32 tst_psFitsAlloc( void ); 23 static psS32 tst_psFitsMoveExtName( void ); 24 static psS32 tst_psFitsMoveExtNum( void ); 24 static psS32 tst_psFitsMoveExtName( void ); // also tests psFitsGetExtName 25 static psS32 tst_psFitsMoveExtNum( void ); // also tests psFitsGetExtNum 25 26 26 27 testDescription tests[] = { … … 125 126 } 126 127 128 // check to see if I can retrieve the name back from the psFits object. 129 char* nameFromFile = psFitsGetExtName(fits); 130 if (strcmp(nameFromFile,extName) != 0) { // hey, it didn't move? 131 psError(PS_ERR_UNKNOWN, false, 132 "Failed to retrieve the extension name back ('%s' vs '%s'", 133 nameFromFile, extName); 134 return 3; 135 } 136 psFree(nameFromFile); 137 127 138 // check that the image is associated to the extension moved, i.e., 128 139 // did we really move to the proper extension? … … 148 159 } 149 160 161 // check to see if I can retrieve the name back from the psFits object. 162 char* nameFromFile = psFitsGetExtName(fits); 163 if (strcmp(nameFromFile,extName) != 0) { // hey, it didn't move? 164 psError(PS_ERR_UNKNOWN, false, 165 "Failed to retrieve the extension name back ('%s' vs '%s'", 166 nameFromFile, extName); 167 return 5; 168 } 169 psFree(nameFromFile); 170 150 171 // check that the image is associated to the extension moved, i.e., 151 172 // did we really move to the proper extension? … … 217 238 lcv); 218 239 return 3; 240 } 241 242 // check to see if I can retrieve the number back from the psFits object. 243 if (psFitsGetExtNum(fits) != lcv) { // hey, it didn't move? 244 psError(PS_ERR_UNKNOWN, false, 245 "Failed to retrieve the extension number back (%d vs %d)", 246 psFitsGetExtNum(fits), lcv); 247 return 5; 219 248 } 220 249 … … 265 294 } 266 295 296 // check to see if I can retrieve the number back from the psFits object. 297 if (psFitsGetExtNum(fits) != lcv) { // hey, it didn't move? 298 psError(PS_ERR_UNKNOWN, false, 299 "Failed to retrieve the extension number back (%d vs %d)", 300 psFitsGetExtNum(fits), lcv); 301 return 13; 302 } 303 267 304 // check that the image is associated to the extension moved, i.e., 268 305 // did we really move to the proper extension? … … 284 321 "Failed to move to extension %d.", 285 322 lcv); 323 return 15; 324 } 325 326 // check to see if I can retrieve the number back from the psFits object. 327 if (psFitsGetExtNum(fits) != lcv) { // hey, it didn't move? 328 psError(PS_ERR_UNKNOWN, false, 329 "Failed to retrieve the extension number back (%d vs %d)", 330 psFitsGetExtNum(fits), lcv); 286 331 return 15; 287 332 }
Note:
See TracChangeset
for help on using the changeset viewer.
