Changeset 5303 for trunk/psLib/test/types
- Timestamp:
- Oct 12, 2005, 2:38:58 PM (21 years ago)
- Location:
- trunk/psLib/test/types
- Files:
-
- 3 edited
-
Makefile.am (modified) (1 diff)
-
tst_psLookupTable_01.c (modified) (9 diffs)
-
verified/tst_psLookupTable_01.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
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.
