IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 7, 2004, 3:13:25 PM (22 years ago)
Author:
evanalst
Message:

Add additional test for psMetadataAdd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psMetadata_03.c

    r2015 r2017  
    1414*  @author  Ross Harman, MHPCC
    1515*
    16 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    17 *  @date  $Date: 2004-10-08 01:00:54 $
     16*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     17*  @date  $Date: 2004-10-08 01:13:25 $
    1818*
    1919*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    197197    printFooter(stdout,"psMetadata","Test K - Attempt to add item with null name", true);
    198198
     199    // Test L - Attempt to add item to an invalid metadata structure
     200    printNegativeTestHeader(stdout,"psMetadata","Test L - Attempt to add item to metadata w/o hash table",
     201                            "Couldn't add item to invalid metadata structure.",0);
     202    mdTable = errMetadata->table;
     203    errMetadata->table = NULL;
     204    if ( psMetadataAdd(errMetadata, PS_LIST_HEAD, "errItem", PS_META_S32,"Integer",22) ) {
     205        psError(__func__,"psMetadataAddItem did not return false w/ invalid metadata struct w/o hash table.");
     206        return 24;
     207    }
     208    errMetadata->table = mdTable;
     209    printFooter(stdout,"psMetadata","Test L - Attempt to add item to invalid metadata w/o hash table", true);
     210
    199211    // Test G - Free psMetadata
    200212    printPositiveTestHeader(stdout, "psMetadata", "Test G - Free psMetadata");
Note: See TracChangeset for help on using the changeset viewer.