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

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

Legend:

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

    r4308 r4457  
    1717 *  @author  Ross Harman, MHPCC
    1818 *
    19  *  @version $Revision: 1.14 $  $Name: not supported by cvs2svn $
    20  *  @date  $Date: 2005-06-17 23:44:22 $
     19 *  @version $Revision: 1.15 $  $Name: not supported by cvs2svn $
     20 *  @date  $Date: 2005-07-06 03:04:35 $
    2121 *
    2222 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    103103        }
    104104    }
    105     fprintf(stderr,"array size = %d\n", psArr->nalloc);
     105    fprintf(stderr,"array size = %ld\n", psArr->nalloc);
    106106    if (psArr->nalloc != 5) {
    107107        psError(PS_ERR_UNKNOWN, true,"Array Size wrong");
    108108        return 3;
    109109    }
    110     fprintf(stderr,"array population = %d\n", psArr->n);
     110    fprintf(stderr,"array population = %ld\n", psArr->n);
    111111    if (psArr->n != 5) {
    112112        psError(PS_ERR_UNKNOWN, true,"Array population wrong");
     
    137137        }
    138138    }
    139     fprintf(stderr,"array size = %d\n", psArr->nalloc);
     139    fprintf(stderr,"array size = %ld\n", psArr->nalloc);
    140140    if (psArr->nalloc != 10) {
    141141        psError(PS_ERR_UNKNOWN, true,"Array Size wrong");
    142142        return 6;
    143143    }
    144     fprintf(stderr,"array population = %d\n", psArr->n);
     144    fprintf(stderr,"array population = %ld\n", psArr->n);
    145145    if (psArr->n != 10) {
    146146        psError(PS_ERR_UNKNOWN, true,"Array Population wrong");
     
    160160        }
    161161    }
    162     fprintf(stderr,"array size = %d\n", psArr->nalloc);
     162    fprintf(stderr,"array size = %ld\n", psArr->nalloc);
    163163    if (psArr->nalloc != 3) {
    164164        psError(PS_ERR_UNKNOWN, true,"Array Size wrong");
    165165        return 9;
    166166    }
    167     fprintf(stderr,"array population = %d\n", psArr->n);
     167    fprintf(stderr,"array population = %ld\n", psArr->n);
    168168    if (psArr->n != 3) {
    169169        psError(PS_ERR_UNKNOWN, true,"Array Population wrong");
     
    189189        return 100;
    190190    }
    191     fprintf(stderr,"Array size after removal = %d\n",psArr->n);
     191    fprintf(stderr,"Array size after removal = %ld\n",psArr->n);
    192192    if ( psArr->n != 2 ) {
    193193        psError(PS_ERR_UNKNOWN, true, "Items in array not decremented after removal");
     
    274274        }
    275275    }
    276     fprintf(stderr,"array size = %d\n", psArr->nalloc);
     276    fprintf(stderr,"array size = %ld\n", psArr->nalloc);
    277277    if (psArr->nalloc != 10) {
    278278        psError(PS_ERR_UNKNOWN, true,"Array Size wrong");
    279279        return 3;
    280280    }
    281     fprintf(stderr,"array population = %d\n", psArr->n);
     281    fprintf(stderr,"array population = %ld\n", psArr->n);
    282282    if (psArr->n != 10) {
    283283        psError(PS_ERR_UNKNOWN, true,"Array population wrong");
  • trunk/psLib/test/collections/tst_psHash00.c

    r3682 r4457  
    2626    }
    2727
    28     if (myHashTable->nbucket != NUM_HASH_TABLE_BUCKETS) {
     28    if (myHashTable->n != NUM_HASH_TABLE_BUCKETS) {
    2929        fprintf(stderr, "%s: myHashTable->nbucket not set properly.\n",
    3030                __func__);
  • 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;
  • trunk/psLib/test/collections/tst_psMetadataIO.c

    r4209 r4457  
    1313 *  @author  Eric Van Alst, MHPCC
    1414 *
    15  *  @version $Revision: 1.19 $  $Name: not supported by cvs2svn $
    16  *  @date  $Date: 2005-06-10 18:09:12 $
     15 *  @version $Revision: 1.20 $  $Name: not supported by cvs2svn $
     16 *  @date  $Date: 2005-07-06 03:04:35 $
    1717 *
    1818 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    263263        // Search list for another entry with same key name
    264264        // Check if last entry
    265         if(iter->index != metadataItemList->size) {
     265        if(iter->index != metadataItemList->n) {
    266266            // Set search iterator to index
    267267            if(!psListIteratorSet(searchIter,iter->index) ) {
     
    422422
    423423    // Verify the number of items in metadata
    424     if(md->list->size != expectedItems) {
     424    if(md->list->n != expectedItems) {
    425425        psError(PS_ERR_UNKNOWN,true,"File: %s : Number of items = %d not as expected %d",
    426                 configFile,md->list->size, expectedItems);
     426                configFile,md->list->n, expectedItems);
    427427        returnValue = false;
    428428    }
     
    795795            if(metaCounter == 0) {
    796796                // Check if number of items is as expected
    797                 if(entryChild->data.md->list->size != testConfig1ValueMetaItems1) {
     797                if(entryChild->data.md->list->n != testConfig1ValueMetaItems1) {
    798798                    psError(PS_ERR_UNKNOWN,true,"File: %s : Metadata 1 items %d not as expected %d",
    799                             testConfig1,entryChild->data.md->list->size,testConfig1ValueMetaItems1);
     799                            testConfig1,entryChild->data.md->list->n,testConfig1ValueMetaItems1);
    800800                    return i*10+6;
    801801                }
     
    824824            } else if(metaCounter == 1) {
    825825                // Check if number of items is as expected
    826                 if(entryChild->data.md->list->size != testConfig1ValueMetaItems2) {
     826                if(entryChild->data.md->list->n != testConfig1ValueMetaItems2) {
    827827                    psError(PS_ERR_UNKNOWN,true,"File: %s : Metadata 2 items %d not as expected %d",
    828                             testConfig1,entryChild->data.md->list->size,testConfig1ValueMetaItems2);
     828                            testConfig1,entryChild->data.md->list->n,testConfig1ValueMetaItems2);
    829829                    return i*10+6;
    830830                }
     
    853853            } else if(metaCounter == 2) {
    854854                // Check if number of items is as expected
    855                 if(entryChild->data.md->list->size != testConfig1ValueMetaItems3) {
     855                if(entryChild->data.md->list->n != testConfig1ValueMetaItems3) {
    856856                    psError(PS_ERR_UNKNOWN,true,"File: %s : Metadata 3 items %d not as expected %d",
    857                             testConfig1,entryChild->data.md->list->size,testConfig1ValueMetaItems3);
     857                            testConfig1,entryChild->data.md->list->n,testConfig1ValueMetaItems3);
    858858                    return i*10+6;
    859859                }
  • trunk/psLib/test/collections/tst_psMetadata_01.c

    r3779 r4457  
    1818*  @author  Ross Harman, MHPCC
    1919*
    20 *  @version $Revision: 1.25 $  $Name: not supported by cvs2svn $
    21 *  @date  $Date: 2005-04-28 02:45:12 $
     20*  @version $Revision: 1.26 $  $Name: not supported by cvs2svn $
     21*  @date  $Date: 2005-07-06 03:04:35 $
    2222*
    2323*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6060    psS32 i;
    6161    psHashBucket* ptr = NULL;
    62     for(i=0; i<mdTable->nbucket; i++) {
     62    for(i=0; i<mdTable->n; i++) {
    6363        ptr = mdTable->buckets[i];
    6464        while (ptr != NULL) {
Note: See TracChangeset for help on using the changeset viewer.