IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12443


Ignore:
Timestamp:
Mar 14, 2007, 5:06:25 PM (19 years ago)
Author:
jhoblitt
Message:

add leak checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/types/tap_psMetadataConfig_input.c

    r12442 r12443  
    11/**
    2  *  C Implementation: tap_psMetadataConfig_input
     2 * tap_psMetdataConfig_input.c
    33 *
    4  * Description:  Tests for psMetadataConfigRead & psMetadataConfigParse
     4 * Description:  Tests for psMetadataConfigRead
    55 *
    66 * Author: dRob <David.Robbins@mhpcc.hpc.mil>, (C) 2006
     7 * Author: Joshua Hoblitt, University of Hawaii 2007
    78 *
    89 * Copyright: See COPYING file that comes with this distribution
     
    2122int main(void)
    2223{
    23     plan_tests(24 + 1);
     24    plan_tests(30 + 1);
    2425
    2526    psLogSetFormat("HLNM");
     
    2930    // Return NULL for NULL filename input
    3031    {
     32        psMemId id = psMemGetId();
    3133        unsigned int nfail = 0;
    3234        psMetadata *md = psMetadataConfigRead(NULL, &nfail, NULL, false);
    3335
    3436        ok(md == NULL, "return NULL for NULL filename input.");
     37
     38        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    3539    }
    3640
    3741    // Return NULL for invalid filename input
    3842    {
     43        psMemId id = psMemGetId();
    3944        unsigned int nfail = 0;
    4045        psMetadata *md = psMetadataConfigRead(NULL, &nfail, ".", false);
    4146
    4247        ok(md == NULL, "return NULL for invalid filename input.");
     48
     49        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    4350    }
    4451
    4552    // Return NULL for missing file input
    4653    {
     54        psMemId id = psMemGetId();
    4755        unsigned int nfail = 0;
    4856        psMetadata *md = psMetadataConfigRead(NULL, &nfail, "table4.dat", false);
    4957        ok(md == NULL, "return NULL for missing file input.");
     58
     59        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    5060    }
    5161
     
    5363    // lines
    5464    {
     65        psMemId id = psMemGetId();
    5566        unsigned int nfail = 0;
    5667        psMetadata *md = psMetadataConfigRead(NULL, &nfail, "table3.dat", false);
     
    5970
    6071        psFree(md);
     72        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    6173    }
    6274
    6375    // Return true for valid inputs - overwrite = false
    6476    {
     77        psMemId id = psMemGetId();
    6578        unsigned int nfail = 0;
    6679        psMetadata *md = psMetadataConfigRead(NULL, &nfail, "metaconf.in", false);
     
    90103        skip_end();
    91104        psFree(md);
     105        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    92106    }
    93107
    94108    // Return true for valid inputs - overwrite = true
    95109    {
     110        psMemId id = psMemGetId();
    96111        unsigned int nfail = 0;
    97112        psMetadata *md = psMetadataConfigRead(NULL, &nfail, "metaconf.in", true);
     
    124139        skip_end();
    125140        psFree(md);
     141        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    126142    }
    127143
Note: See TracChangeset for help on using the changeset viewer.