IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 881


Ignore:
Timestamp:
Jun 4, 2004, 2:35:01 PM (22 years ago)
Author:
gusciora
Message:

psHashKeyList() tests and the stdout files.

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

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psHash00.c

    r860 r881  
    11/*****************************************************************************
    2     This code will test whether a hash table can be allocated successfully.
     2    This code will test whether a hash table can be allocated successfully,
     3    then deallocated successfully.
    34 *****************************************************************************/
    45#include <stdio.h>
  • trunk/psLib/test/sysUtils/tst_psHash01.c

    r860 r881  
    11/*****************************************************************************
    22    This code will test whether a hash table can be de-allocated successfully.
    3  
    4     GUS: figure out how the memory leak detection stuff works, then put it
    5     in here.
    63 *****************************************************************************/
    74#include <stdio.h>
     
    5451    psHashFree(myHashTable, (void (*)(void *))IdFree);
    5552
    56     //
    57     // GUS: put some memory leak stuff here.
    58     //
    59 
    6053    if (imGlobal != 4) {
    6154        fprintf(stderr, "%s: only (%d/4) entries were freed",
  • trunk/psLib/test/sysUtils/tst_psHash02.c

    r861 r881  
    11/*****************************************************************************
    2     This code will test whether hash tables entries can be inserted correctly.
     2    This code will test whether hash tables entries can be inserted correctly,
     3    and retrieved correctly.
    34 
    45    GUS: Add code to test whether duplicates are handled correctly (use a
  • trunk/psLib/test/sysUtils/tst_psHash04.c

    r861 r881  
    3838    int currentId = psMemGetId();
    3939    int memLeaks        = 0;
     40    psDlist *myLinkList = NULL;
     41    psDlistElem *tmp = NULL;
    4042
    4143    printPositiveTestHeader(stdout,
     
    5052        i++;
    5153    }
     54    myLinkList = psHashKeyList(myHashTable);
     55    tmp = myLinkList->head;
     56    while (tmp != NULL) {
     57        printf("Linked List Entries: %s\n", (char *) tmp->data);
     58        tmp = tmp->next;
     59    }
    5260
    53     //
    54     // GUS: add call to psHashKeyList()
    55     //
    56     psHashKeyList();
     61    psDlistFree(myLinkList, NULL);
    5762
    5863    printFooter(stdout,
  • trunk/psLib/test/sysUtils/verified/tst_psHash04.stdout

    r588 r881  
    55\----------------------------------------------------------------------------------/
    66
    7 This has not been coded.
     7Linked List Entries: ENTRY03
     8Linked List Entries: ENTRY02
     9Linked List Entries: ENTRY01
     10Linked List Entries: ENTRY00
    811
    912---> TESTPOINT PASSED (psHash functions{psHashKeyList()} | tst_psHash04.c)
Note: See TracChangeset for help on using the changeset viewer.