Changeset 5303
- Timestamp:
- Oct 12, 2005, 2:38:58 PM (21 years ago)
- Location:
- trunk/psLib/test
- Files:
-
- 5 edited
-
imageops/Makefile.am (modified) (1 diff)
-
imageops/tst_psImageGeomManip.c (modified) (4 diffs)
-
types/Makefile.am (modified) (1 diff)
-
types/tst_psLookupTable_01.c (modified) (9 diffs)
-
types/verified/tst_psLookupTable_01.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/Makefile.am
r5227 r5303 1 1 #Makefile for imageops tests of psLib 2 2 # 3 AM_CPPFLAGS = $(SRCINC) $(PSLIB_CFLAGS) 3 AM_CPPFLAGS = $(SRCINC) $(PSLIB_CFLAGS) -DVERIFIED_DIR=\"$(srcdir)/verified\" 4 4 AM_LDFLAGS = -L$(top_builddir)/src -lpslib $(PSLIB_LIBS) 5 5 -
trunk/psLib/test/imageops/tst_psImageGeomManip.c
r5057 r5303 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005- 09-15 21:22:22$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-13 00:38:53 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 496 496 497 497 The following steps of the testpoint are done manually via inspection of 498 temp/fOut.fits & temp/sOut.fits.498 fOut.fits & sOut.fits. 499 499 500 500 * Verify the returned psImage structure contains expected values, if … … 538 538 mkdir("temp",0777); 539 539 remove 540 ("temp/out.fits"); 540 ("fOut.fits"); 541 remove 542 ("sOut.fits"); 543 remove 544 ("fBiOut.fits"); 545 remove 546 ("sBiOut.fits"); 541 547 psS32 index = 0; 542 548 psBool fail = false; 543 549 psF32 radianRot; 544 550 545 psFits* fOutFile = psFitsAlloc(" temp/fOut.fits");546 psFits* sOutFile = psFitsAlloc(" temp/sOut.fits");547 psFits* fBiOutFile = psFitsAlloc(" temp/fBiOut.fits");548 psFits* sBiOutFile = psFitsAlloc(" temp/sBiOut.fits");551 psFits* fOutFile = psFitsAlloc("fOut.fits"); 552 psFits* sOutFile = psFitsAlloc("sOut.fits"); 553 psFits* fBiOutFile = psFitsAlloc("fBiOut.fits"); 554 psFits* sBiOutFile = psFitsAlloc("sBiOut.fits"); 549 555 if (fOutFile == NULL ||sOutFile == NULL || fBiOutFile == NULL || sBiOutFile == NULL) { 550 556 psError(PS_ERR_UNKNOWN, true, "Can not create output files, so why continue!?"); … … 552 558 } 553 559 554 psFits* fTruthFile = psFitsAlloc( "verified/fOut.fits");555 psFits* sTruthFile = psFitsAlloc( "verified/sOut.fits");556 psFits* fBiTruthFile = psFitsAlloc( "verified/fBiOut.fits");557 psFits* sBiTruthFile = psFitsAlloc( "verified/sBiOut.fits");560 psFits* fTruthFile = psFitsAlloc(VERIFIED_DIR "/fOut.fits"); 561 psFits* sTruthFile = psFitsAlloc(VERIFIED_DIR "/sOut.fits"); 562 psFits* fBiTruthFile = psFitsAlloc(VERIFIED_DIR "/fBiOut.fits"); 563 psFits* sBiTruthFile = psFitsAlloc(VERIFIED_DIR "/sBiOut.fits"); 558 564 if (fTruthFile == NULL ||sTruthFile == NULL || fBiTruthFile == NULL || sBiTruthFile == NULL) { 559 565 psError(PS_ERR_UNKNOWN, true, "Can not open truth files, so why continue!?"); -
trunk/psLib/test/types/Makefile.am
r4981 r5303 1 1 #Makefile for types tests 2 2 # 3 AM_CPPFLAGS = $(SRCINC) $(PSLIB_CFLAGS) 3 AM_CPPFLAGS = $(SRCINC) $(PSLIB_CFLAGS) -DVERIFIED_DIR=\"$(srcdir)/verified\" 4 4 AM_LDFLAGS = -L$(top_builddir)/src -lpslib $(PSLIB_LIBS) 5 5 AM_CFLAGS = -DXML_CONFIG_FILE="\"$(top_srcdir)/etc/pslib/psTime.xml\"" 6 6 7 7 8 TESTS = \ -
trunk/psLib/test/types/tst_psLookupTable_01.c
r4547 r5303 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2005- 07-13 02:47:01$14 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-10-13 00:38:56 $ 16 16 * 17 17 * Copyright 2004-5 Maui High Performance Computing Center, University of Hawaii … … 35 35 const psS32 tableU8_size = 4; 36 36 const char tableU8_format[] = "\%d \%d \%d \%ld \%d \%d \%d \%ld \%f \%lf"; 37 const char tableU8_filename[] = "verified/tableU8.dat";37 const char tableU8_filename[] = VERIFIED_DIR "/tableU8.dat"; 38 38 const psS32 tableU8_indexCol = 0; 39 39 const psS32 tableU8_index[] = … … 82 82 const psS32 tableF32_size = 4; 83 83 const psS32 tableF32_cols = 9; 84 const char tableF32_filename[] = "verified/tableF32.dat";84 const char tableF32_filename[] = VERIFIED_DIR "/tableF32.dat"; 85 85 const char tableF32_format[] = "\%f \%d \%d \%ld \%d \%d \%d \%ld \%d \%lf"; 86 86 const char tableF32_indexCol = 0; … … 133 133 const psS32 table10_size = 10; 134 134 const char table10_format[] = "\%d \%d \%d \%ld \%d \%d \%d \%ld \%f \%lf"; 135 const char table10_filename[] = "verified/table10.dat";135 const char table10_filename[] = VERIFIED_DIR "/table10.dat"; 136 136 const psS32 table10_indexCol = 0; 137 137 const psS32 table10_index[] = … … 257 257 258 258 // Read file and place into an array of vectors 259 out = psVectorsReadFromFile( "verified/tableF32.dat","\%f \%d \%d \%ld \%d \%d \%d \%ld \%*d \%lf");259 out = psVectorsReadFromFile(VERIFIED_DIR "/tableF32.dat","\%f \%d \%d \%ld \%d \%d \%d \%ld \%*d \%lf"); 260 260 if(out == NULL) { 261 261 psError(PS_ERR_UNKNOWN,true,"Unable to read file into array of vectors"); … … 371 371 // Attempt to read vectors from valid file with invalid format 372 372 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for NULL format"); 373 out = psVectorsReadFromFile( "verified/tableF32.dat",NULL);373 out = psVectorsReadFromFile(VERIFIED_DIR "/tableF32.dat",NULL); 374 374 if(out != NULL) { 375 375 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with NULL format string"); … … 387 387 // Attempt to read vectors from valid file with invalid format specifiers 388 388 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for invalid format specifier"); 389 out = psVectorsReadFromFile( "verified/tableF32.data","\%f \%c \%d");389 out = psVectorsReadFromFile(VERIFIED_DIR "/tableF32.data","\%f \%c \%d"); 390 390 if(out != NULL) { 391 391 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid format specifier"); … … 395 395 // Attempt to read vectors from non-existant file 396 396 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for non-existant file"); 397 out = psVectorsReadFromFile(" verified/nonexistant.dat","\%f \%d \%d");397 out = psVectorsReadFromFile("nonexistant.dat","\%f \%d \%d"); 398 398 if(out != NULL) { 399 399 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with non-existant file"); … … 403 403 // Attempt to read vectors from file with errors in the numbers 404 404 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message for error is file"); 405 out = psVectorsReadFromFile( "verified/tableF32_err.dat","\%f \%d \%d \%ld \%d \%d \%d \%ld \%d \%lf");405 out = psVectorsReadFromFile(VERIFIED_DIR "/tableF32_err.dat","\%f \%d \%d \%ld \%d \%d \%d \%ld \%d \%lf"); 406 406 if(out != NULL) { 407 407 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with file with errors"); -
trunk/psLib/test/types/verified/tst_psLookupTable_01.stderr
r4589 r5303 39 39 Following should generate error message for non-existant file 40 40 <DATE><TIME>|<HOST>|E|psVectorsReadFromFile (FILE:LINENO) 41 Failed to open file verified/nonexistant.dat.41 Failed to open file nonexistant.dat. 42 42 <DATE><TIME>|<HOST>|I|testVectorsReadFromFile 43 43 Following should generate error message for error is file
Note:
See TracChangeset
for help on using the changeset viewer.
