IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 16, 2007, 4:42:59 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/tests/metadatafromobject.c

    r11820 r11867  
    19981998    }
    19991999
     2000    {
     2001        psMetadata      *md;
     2002        p6InputScfileRow *object;
     2003        bool            status;
     2004
     2005        object = p6InputScfileRowAlloc(-32, -32, "a string", "a string");
     2006        if (!object) {
     2007            exit(EXIT_FAILURE);
     2008        }
     2009
     2010        md = p6InputScfileMetadataFromObject(object);
     2011        if (!md) {
     2012            exit(EXIT_FAILURE);
     2013        }
     2014
     2015        psFree(object);
     2016
     2017        if (!psMetadataLookupS32(&status, md, "p6_id") == -32) {
     2018            psFree(md);
     2019            exit(EXIT_FAILURE);
     2020        }
     2021        if (!psMetadataLookupS32(&status, md, "p4_id") == -32) {
     2022            psFree(md);
     2023            exit(EXIT_FAILURE);
     2024        }
     2025        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
     2026            psFree(md);
     2027            exit(EXIT_FAILURE);
     2028        }
     2029        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
     2030            psFree(md);
     2031            exit(EXIT_FAILURE);
     2032        }
     2033
     2034        psFree(md);
     2035    }
     2036
     2037    {
     2038        psMetadata      *md;
     2039        p6SumScfileRow  *object;
     2040        bool            status;
     2041
     2042        object = p6SumScfileRowAlloc(-32, "a string", "a string", "a string", 64.64, 64.64);
     2043        if (!object) {
     2044            exit(EXIT_FAILURE);
     2045        }
     2046
     2047        md = p6SumScfileMetadataFromObject(object);
     2048        if (!md) {
     2049            exit(EXIT_FAILURE);
     2050        }
     2051
     2052        psFree(object);
     2053
     2054        if (!psMetadataLookupS32(&status, md, "p6_id") == -32) {
     2055            psFree(md);
     2056            exit(EXIT_FAILURE);
     2057        }
     2058        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
     2059            psFree(md);
     2060            exit(EXIT_FAILURE);
     2061        }
     2062        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
     2063            psFree(md);
     2064            exit(EXIT_FAILURE);
     2065        }
     2066        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     2067            psFree(md);
     2068            exit(EXIT_FAILURE);
     2069        }
     2070        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
     2071            psFree(md);
     2072            exit(EXIT_FAILURE);
     2073        }
     2074        if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
     2075            psFree(md);
     2076            exit(EXIT_FAILURE);
     2077        }
     2078
     2079        psFree(md);
     2080    }
     2081
    20002082    exit(EXIT_SUCCESS);
    20012083}
Note: See TracChangeset for help on using the changeset viewer.