IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 3, 2004, 5:02:28 PM (22 years ago)
Author:
evanalst
Message:

Add additional test case for psHashKeyList.

File:
1 edited

Legend:

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

    r2392 r2626  
    4747    ID* id = NULL;
    4848
    49     printPositiveTestHeader(stdout,
    50                             "psHash functions",
    51                             "psHashKeyList()");
    52 
     49    printPositiveTestHeader(stdout,"psHash functions","psHashKeyList()");
    5350    myHashTable = psHashAlloc(NUM_HASH_TABLE_BUCKETS);
    5451    i = 0;
     
    6562        tmp = tmp->next;
    6663    }
    67 
     64    printFooter(stdout,"psHash functions","psHashKeyList()",testStatus);
    6865    psFree(myLinkList);
    6966
    70     printFooter(stdout,
    71                 "psHash functions",
    72                 "psHashKeyList()",
    73                 testStatus);
     67    printNegativeTestHeader(stdout,"psHashKeyList","NULL table","Can not lookup with NULL table",0);
     68    myLinkList = psHashKeyList(NULL);
     69    if(myLinkList != NULL) {
     70        psError(PS_ERR_UNKNOWN,true,"psHashKeyList retrieved a key list from a NULL table.");
     71        return 1;
     72    }
     73    printFooter(stdout,"psHashKeyList","NULL table",true);
    7474
    7575    psFree(myHashTable);
    7676
    7777    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    78     if (0 != memLeaks) {
     78    if (memLeaks != 0) {
    7979        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    8080    }
Note: See TracChangeset for help on using the changeset viewer.