IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4374


Ignore:
Timestamp:
Jun 23, 2005, 4:11:59 PM (21 years ago)
Author:
evanalst
Message:

Update test case for psDBDumpCols to test for invalid arguments.

Location:
trunk/psLib/test/dataIO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataIO/tst_psDB.c

    r4372 r4374  
    99 *  @author Aaron Culliney, MHPCC
    1010 *
    11  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-24 01:49:25 $
     11 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-24 02:11:59 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    15491549                return 5*(itemNum+1);
    15501550            }
    1551             //                if(((psArray*)mdItem->data[0])->type.type != PS_TYPE_S32) {
    1552             //                    psError(PS_ERR_UNKNOWN,true,"Column #%d vector type %d not as expected %d",
    1553             //                            itemNum,((psVector*)mdItem->data.V)->type.type, PS_TYPE_S32);
    1554             //                    psDBDropTable(dbh,table);
    1555             //                    psDBCleanup(dbh);
    1556             //                    return 6*(itemNum+1);
    1557             //                }
    15581551            if(((psArray*)mdItem->data.V)->n != 3) {
    15591552                psError(PS_ERR_UNKNOWN,true,"Column #%d vector size %d not as expected %d",
     
    17301723    psFree(mdIter);
    17311724    psFree(meta);
     1725
     1726    // Attempt to dump columns from NULL database object
     1727    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL database");
     1728    if(psDBDumpCols(NULL,table) != NULL) {
     1729        psError(PS_ERR_UNKNOWN,true,"Did not expect non-NULL when dumping columns from NULL database");
     1730        psDBDropTable(dbh,table);
     1731        psDBCleanup(dbh);
     1732        return 10;
     1733    }
     1734
     1735    // Attempt to dump columns for NULL table
     1736    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL table");
     1737    if(psDBDumpCols(dbh,NULL) != NULL) {
     1738        psError(PS_ERR_UNKNOWN,true,"Did not expect non-NULL when dumping columns from NULL table");
     1739        psDBDropTable(dbh,table);
     1740        psDBCleanup(dbh);
     1741        return 11;
     1742    }
     1743
    17321744
    17331745    psDBDropTable(dbh, table);
  • trunk/psLib/test/dataIO/verified/tst_psDB.stderr

    r4372 r4374  
    263263\**********************************************************************************/
    264264
     265<DATE><TIME>|<HOST>|I|TPDBDumpCols
     266    Following should generate an error message for NULL database
     267<DATE><TIME>|<HOST>|E|psDBDumpCols (FILE:LINENO)
     268    Invalid psDB has been specified.
     269<DATE><TIME>|<HOST>|I|TPDBDumpCols
     270    Following should generate an error message for NULL table
     271<DATE><TIME>|<HOST>|E|psDBDumpCols (FILE:LINENO)
     272    NULL table specified.
    265273
    266274---> TESTPOINT PASSED (psDB{dbDumpCols} | tst_psDB.c)
Note: See TracChangeset for help on using the changeset viewer.