Changeset 1001
- Timestamp:
- Jun 11, 2004, 9:18:41 AM (22 years ago)
- Location:
- trunk/psLib/test
- Files:
-
- 26 added
- 25 deleted
- 2 edited
-
dataManip/Makefile (modified) (3 diffs)
-
dataManip/builddir (added)
-
dataManip/builddir/tst_psFunc00.d (added)
-
dataManip/builddir/tst_psFunc01.d (added)
-
dataManip/builddir/tst_psHist00.d (added)
-
dataManip/builddir/tst_psHist01.d (added)
-
dataManip/builddir/tst_psHist02.d (added)
-
dataManip/builddir/tst_psImageIO.d (added)
-
dataManip/builddir/tst_psImageStats00.d (added)
-
dataManip/builddir/tst_psImageStats01.d (added)
-
dataManip/builddir/tst_psImageStats02.d (added)
-
dataManip/builddir/tst_psMatrix01.d (added)
-
dataManip/builddir/tst_psMatrix02.d (added)
-
dataManip/builddir/tst_psMatrix03.d (added)
-
dataManip/builddir/tst_psMatrix04.d (added)
-
dataManip/builddir/tst_psMatrix05.d (added)
-
dataManip/builddir/tst_psMatrix06.d (added)
-
dataManip/builddir/tst_psMatrix07.d (added)
-
dataManip/builddir/tst_psStats00.d (added)
-
dataManip/builddir/tst_psStats01.d (added)
-
dataManip/builddir/tst_psStats02.d (added)
-
dataManip/builddir/tst_psStats03.d (added)
-
dataManip/builddir/tst_psStats05.d (added)
-
dataManip/builddir/tst_psStats06.d (added)
-
dataManip/builddir/tst_psStats07.d (added)
-
dataManip/builddir/tst_psStats08.d (added)
-
dataManip/builddir/tst_psStats09.d (added)
-
dataManip/tst_psFunc00.d (deleted)
-
dataManip/tst_psFunc01.d (deleted)
-
dataManip/tst_psHist00.d (deleted)
-
dataManip/tst_psHist01.d (deleted)
-
dataManip/tst_psHist02.d (deleted)
-
dataManip/tst_psImageIO.d (deleted)
-
dataManip/tst_psImageStats00.d (deleted)
-
dataManip/tst_psImageStats01.d (deleted)
-
dataManip/tst_psImageStats02.d (deleted)
-
dataManip/tst_psMatrix01.d (deleted)
-
dataManip/tst_psMatrix02.d (deleted)
-
dataManip/tst_psMatrix03.d (deleted)
-
dataManip/tst_psMatrix04.d (deleted)
-
dataManip/tst_psMatrix05.d (deleted)
-
dataManip/tst_psMatrix06.d (deleted)
-
dataManip/tst_psMatrix07.d (deleted)
-
dataManip/tst_psStats00.d (deleted)
-
dataManip/tst_psStats01.d (deleted)
-
dataManip/tst_psStats02.d (deleted)
-
dataManip/tst_psStats03.d (deleted)
-
dataManip/tst_psStats05.d (deleted)
-
dataManip/tst_psStats06.d (deleted)
-
dataManip/tst_psStats07.d (deleted)
-
dataManip/tst_psStats08.d (deleted)
-
dataManip/tst_psStats09.d (deleted)
-
image/tst_psImageIO.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataManip/Makefile
r987 r1001 3 3 ## Makefile: test/sysUtils 4 4 ## 5 ## $Revision: 1.1 0$ $Name: not supported by cvs2svn $6 ## $Date: 2004-06-1 0 20:52:14$5 ## $Revision: 1.11 $ $Name: not supported by cvs2svn $ 6 ## $Date: 2004-06-11 19:18:41 $ 7 7 ## 8 8 ## Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 42 42 tst_psImageIO 43 43 44 OBJS = $(addsuffix .o,$(TARGET)) 44 DEPENDENCIES = $(addprefix builddir/,$(addsuffix .d,$(TARGET))) 45 OBJS = $(addprefix builddir/,$(addsuffix .o,$(TARGET))) 45 46 46 all: $(TARGET)47 all: builddir $(TARGET) 47 48 48 include $(OBJS:.o=.d) 49 builddir: 50 mkdir builddir 51 52 include $(DEPENDENCIES) 49 53 50 54 clean: 51 55 @echo " Deleting executable and binary files for 'test/sysUtils'" 52 $(RM) $(TARGET) *.o*.lint56 $(RM) $(TARGET) $(OBJS) *.lint 53 57 54 %.o : %.c58 builddir/%.o : %.c 55 59 $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -I$(PSLIB_INCL_DIR) -c -o $@ $< 56 60 57 % : %.o61 % : builddir/%.o 58 62 $(CC) -o $@ $< -L$(PSLIB_LIB_DIR) -lpslib -lpstest -lgsl -lgslcblas $(LDFLAGS) 59 63 … … 64 68 splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@ 65 69 66 %.d: %.c70 builddir/%.d: %.c 67 71 $(CC) -MM $(CFLAGS) -I$(PSLIB_INCL_DIR) $< > $@.tmp 68 sed 's /\($*\)\.o[ :]*/\1.o $@ : /g' $@.tmp > $@72 sed 's|\($*\)\.o[ :]*|builddir\/\1.o $@ : |g' $@.tmp > $@ 69 73 $(RM) -f $@.tmp 70 74 -
trunk/psLib/test/image/tst_psImageIO.c
r999 r1001 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06-11 1 8:50:49$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-11 19:18:41 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 16 16 #include <string.h> 17 17 #include <stdlib.h> 18 #include <sys/stat.h> 19 #include <sys/types.h> 18 20 19 21 #include "psTest.h" … … 172 174 173 175 #define testReadType(TYP,filename) \ 174 testReadTypeSize(1,1,0,0,1,1,TYP,"1x1_" filename); \ 175 testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"Mx1_" filename); \ 176 testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"1xN_" filename); \ 177 testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"MxN_" filename); 176 mkdir("tmpImages",0777); \ 177 testReadTypeSize(1,1,0,0,1,1,TYP,"tmpImages/1x1_" filename); \ 178 testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"tmpImages/Mx1_" filename); \ 179 testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"tmpImages/1xN_" filename); \ 180 testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"tmpImages/MxN_" filename); 178 181 179 182 testReadType(U8,"U8.fits"); … … 222 225 223 226 psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extnum is invalid."); 224 image = psImageReadSection(image,0,0,M,N,0,NULL,4," MxN_F32.fits");227 image = psImageReadSection(image,0,0,M,N,0,NULL,4,"tmpImages/MxN_F32.fits"); 225 228 if (image != NULL) { 226 229 psError(__func__,"Image returned though extnum was invalid."); … … 228 231 } 229 232 psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extname is invalid."); 230 image = psImageReadSection(image,0,0,M,N,0,"bogus",0," MxN_F32.fits");233 image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"tmpImages/MxN_F32.fits"); 231 234 if (image != NULL) { 232 235 psError(__func__,"Image returned though extnum was invalid."); … … 288 291 GENIMAGE(img,m,n,F32,0); 289 292 GENIMAGE(img2,m,n,F32,row+2*col); 293 mkdir("tmpImages",0777); 290 294 remove 291 295 ("writeTest.fits"); 292 if (psImageWriteSection(img,0,0,0,NULL,0," writeTest.fits") != 0) {296 if (psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) { 293 297 psError(__func__,"Couldn't write writeTest.fits."); 294 298 return 14; 295 299 } 296 if (psImageWriteSection(img2,0,0,0,NULL,0," writeTest.fits") != 0) {300 if (psImageWriteSection(img2,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) { 297 301 psError(__func__,"Couldn't overwrite writeTest.fits."); 298 302 return 15; … … 302 306 303 307 // Did it really overwrite the pixel values? Let's read it in and see. 304 img = psImageReadSection(NULL,0,0,m,n,0,NULL,0," writeTest.fits");308 img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"tmpImages/writeTest.fits"); 305 309 if (img == NULL) { 306 310 psError(__func__,"Could not read in writeTest.fits.");
Note:
See TracChangeset
for help on using the changeset viewer.
