IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3083


Ignore:
Timestamp:
Jan 24, 2005, 2:13:12 PM (21 years ago)
Author:
evanalst
Message:

Update test case for psListGetPrevious to check for the ability to return
to the list after psListGetNext has gone off the list.

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

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/collections/tst_psList.c

    r3066 r3083  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-01-20 01:48:38 $
     8 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-25 00:13:12 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    936936
    937937    // 1. output error message and do nothing if iterator=NULL
    938     psLogMsg(__func__,PS_LOG_INFO,"Following should error with "
    939              "'Unexpected null pointer'");
    940938    psListIteratorSet(NULL,PS_LIST_HEAD);
    941939    if (psListIteratorSet(NULL,PS_LIST_HEAD)) {
     
    10021000        return 16;
    10031001    }
    1004     if (psListGetNext(iter) != NULL) {
     1002    if ((psListGetNext(iter) != NULL) || (!iter->offEnd)) {
    10051003        psError(PS_ERR_UNKNOWN, true,"psListGetNext moved cursor beyond tail.");
    10061004        return 17;
     1005    }
     1006    if(psListGetPrevious(iter) != NULL) {
     1007        psError(PS_ERR_UNKNOWN,true,"psListGetPrevious did not return NULL when offEnd is true");
     1008        return 18;
     1009    }
     1010    if(iter->offEnd) {
     1011        psError(PS_ERR_UNKNOWN,true,"psListGetPrevious did not move back onto the list.");
     1012        return 19;
     1013    }
     1014    if(*(psS32*)psListGetPrevious(iter) != 14) {
     1015        psError(PS_ERR_UNKNOWN,true,"psListGetPrevious did not return correct value of tail.");
     1016        return 20;
    10071017    }
    10081018
  • trunk/psLib/test/collections/verified/tst_psList.stderr

    r3066 r3083  
    9696<DATE><TIME>|<HOST>|I|testListIterator
    9797     psListSetIterator/psListGetNext/psListGetPrev shall move the list cursor to the specified location
    98 <DATE><TIME>|<HOST>|I|testListIterator
    99     Following should error with 'Unexpected null pointer'
    10098
    10199---> TESTPOINT PASSED (psList{psListIterator} | tst_psList.c)
Note: See TracChangeset for help on using the changeset viewer.