IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 5, 2005, 5:04:35 PM (21 years ago)
Author:
drobbin
Message:

made changes based on revisions in psLib SDRS rev. 15

File:
1 edited

Legend:

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

    r3682 r4457  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-04-07 20:27:41 $
     8 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-07-06 03:04:35 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777        return 2;
    7878    }
    79     if (list->size != 0) {
     79    if (list->n != 0) {
    8080        psError(PS_ERR_UNKNOWN, true,"size of list wasn't zero for empty list.");
    8181        return 3;
     
    101101    }
    102102
    103     if (list->size != 1) {
     103    if (list->n != 1) {
    104104        psError(PS_ERR_UNKNOWN, true,"size of list wasn't correctly set for new, one-element list.");
    105105        return 7;
     
    310310    list = psListAlloc(data);
    311311    psFree(data);
    312     if (list->size != 1) {
     312    if (list->n != 1) {
    313313        psError(PS_ERR_UNKNOWN, true,"psListAlloc didn't create a list properly.");
    314314        return 2;
     
    321321        return 40;
    322322    }
    323     if ( list->size != 1) {
     323    if ( list->n != 1) {
    324324        psError(PS_ERR_UNKNOWN, true,"psListAdd with a NULL data element changed the list size or returned success.");
    325325        return 3;
     
    341341
    342342    // verify that the size incremented
    343     if (list->size != 2) {
     343    if (list->n != 2) {
    344344        psError(PS_ERR_UNKNOWN, true,"psListAdd didn't increment the size by one");
    345345        return 4;
     
    365365    psFree(data);
    366366    // verify that the size incremented
    367     if (list->size != 3) {
     367    if (list->n != 3) {
    368368        psError(PS_ERR_UNKNOWN, true,"psListAdd didn't increment the size by 1");
    369369        return 6;
     
    399399    psFree(data);
    400400    // verify that the size wasn't incremented
    401     if (list->size != 3) {
     401    if (list->n != 3) {
    402402        printListInt(list);
    403403        psError(PS_ERR_UNKNOWN, true,"psListAdd didn't insert to head when where was invalid.");
     
    420420    psFree(data);
    421421    // verify that the size incremented
    422     if (list->size != 4 || *(psS32*)list->head->next->data != 5) {
     422    if (list->n != 4 || *(psS32*)list->head->next->data != 5) {
    423423        printListInt(list);
    424424        psError(PS_ERR_UNKNOWN, true,"psListAdd didn't insert to position #1.");
     
    439439    psFree(data);
    440440    // verify that the size incremented
    441     if (list->size != 5  || *(psS32 *)list->head->next->next->next->data != 6) {
     441    if (list->n != 5  || *(psS32 *)list->head->next->next->next->data != 6) {
    442442        printListInt(list);
    443443        psError(PS_ERR_UNKNOWN, true,"psListAdd didn't insert to position #4.");
     
    460460    psFree(data);
    461461    // verify that the size incremented
    462     if (list->size != 6  || *(psS32 *)list->tail->prev->prev->data != 7) {
     462    if (list->n != 6  || *(psS32 *)list->tail->prev->prev->data != 7) {
    463463        printListInt(list);
    464464        psError(PS_ERR_UNKNOWN, true,"psListAdd didn't insert to position #2.");
     
    480480        return 29;
    481481    }
    482     if(list->size != 7 || *(psS32 *)list->tail->data != 8) {
     482    if(list->n != 7 || *(psS32 *)list->tail->data != 8) {
    483483        printListInt(list);
    484484        psError(PS_ERR_UNKNOWN,true,"psListAdd didn't place added item at tail.");
     
    660660    }
    661661
    662     if (list->size != --items) {
     662    if (list->n != --items) {
    663663        printListInt(list);
    664664        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
     
    682682    }
    683683
    684     if (list->size != --items) {
     684    if (list->n != --items) {
    685685        printListInt(list);
    686686        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
     
    697697    }
    698698
    699     if (list->size != --items) {
     699    if (list->n != --items) {
    700700        printListInt(list);
    701701        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
     
    721721    }
    722722
    723     if (list->size != --items) {
     723    if (list->n != --items) {
    724724        printListInt(list);
    725725        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
     
    736736    }
    737737
    738     if (list->size != --items) {
     738    if (list->n != --items) {
    739739        printListInt(list);
    740740        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
     
    756756    }
    757757
    758     if (list->size != --items) {
     758    if (list->n != --items) {
    759759        printListInt(list);
    760760        psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items);
     
    771771    }
    772772
    773     if (list->size != items) {
     773    if (list->n != items) {
    774774        printListInt(list);
    775775        psError(PS_ERR_UNKNOWN, true,"size not %d, as expected.",items);
     
    791791    }
    792792
    793     if (list->size != 0) {
     793    if (list->n != 0) {
    794794        printListInt(list);
    795795        psError(PS_ERR_UNKNOWN, true,"Didn't remove all the elements.");
     
    835835    arr = psListToArray(list);
    836836
    837     if (arr->n != 15 || list->size != 15) {
     837    if (arr->n != 15 || list->n != 15) {
    838838        psError(PS_ERR_UNKNOWN, true,"The created array didn't have the proper size");
    839839        return 1;
     
    873873    list = psArrayToList(arr);
    874874
    875     if (arr->n != 15 || list->size != 15) {
     875    if (arr->n != 15 || list->n != 15) {
    876876        psError(PS_ERR_UNKNOWN, true,"The created array didn't have the proper size");
    877877        return 1;
     
    11121112    (not needed, as psListAdd is tested elsewhere, but check anyway.)
    11131113    */
    1114     if (list->size != 15) {
     1114    if (list->n != 15) {
    11151115        psError(PS_ERR_UNKNOWN, true,"List wasn't populated as expected?");
    11161116        return 2;
Note: See TracChangeset for help on using the changeset viewer.