#include <pslib.h>
#include <ippdb.h>
#include <stdlib.h>
#include <string.h>

#define MAX_STRING_LENGTH 1024

int main ()
{
    {
        psMetadata      *md;
        weatherRow      *object;
        bool            status;

        object = weatherRowAlloc(32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = weatherMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupF32(&status, md, "temp01") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "humi01") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "temp02") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "humi02") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "temp03") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "humi03") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "pressure") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        skyp_transparencyRow *object;
        bool            status;

        object = skyp_transparencyRowAlloc("a string", 64.64, -32, 64.64, 64.64, 32.32, 64.64);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = skyp_transparencyMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "trans") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "nstars") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "exptime") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "sky_bright") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        skyp_absorptionRow *object;
        bool            status;

        object = skyp_absorptionRowAlloc("a string", 32.32, 32.32, 32.32, -32, 64.64, 64.64, 32.32, 64.64);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = skyp_absorptionMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "disperser_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "atmcomp1") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "atmcomp2") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "atmcomp3") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "nstars") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "exptime") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "sky_bright") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        skyp_emissionRow *object;
        bool            status;

        object = skyp_emissionRowAlloc("a string", 32.32, 32.32, 32.32, 32.32, 32.32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = skyp_emissionMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "disperser_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "atmcomp1") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "atmcomp2") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "atmcomp3") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "continuum") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "exptime") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        dimmRow         *object;
        bool            status;

        object = dimmRowAlloc(32.32, 32.32, 32.32, 64.64, 64.64, 32.32, "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = dimmMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupF32(&status, md, "sigmax") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "sigmay") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "fwhm") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "expttime") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        skyp_irRow      *object;
        bool            status;

        object = skyp_irRowAlloc(64.64, 64.64, 64.64, 64.64, 32.32, 32.32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = skyp_irMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupF64(&status, md, "sky_bright") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "sky_var") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "fov_x") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "fov_y") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        domeRow         *object;
        bool            status;

        object = domeRowAlloc(32.32, true, true, true);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = domeMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupF32(&status, md, "az") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupBool(&status, md, "open") == true) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupBool(&status, md, "light") == true) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupBool(&status, md, "track") == true) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        telescopeRow    *object;
        bool            status;

        object = telescopeRowAlloc("a string", 32.32, 32.32, 64.64, 64.64);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = telescopeMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "guide"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "alt") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF32(&status, md, "az") == 32.32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        summitExpRow    *object;
        bool            status;

        object = summitExpRowAlloc("a string", "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = summitExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        pzPendingExpRow *object;
        bool            status;

        object = pzPendingExpRowAlloc("a string", "a string", "a string", "a string", -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = pzPendingExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        pzPendingImfileRow *object;
        bool            status;

        object = pzPendingImfileRowAlloc("a string", -32, "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = pzPendingImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "bytes") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "md5sum"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        newExpRow       *object;
        bool            status;

        object = newExpRowAlloc("a string", "a string", "a string", "a string", -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = newExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        newImfileRow    *object;
        bool            status;

        object = newImfileRowAlloc("a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = newImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        rawDetrendExpRow *object;
        bool            status;

        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = rawDetrendExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        rawScienceExpRow *object;
        bool            status;

        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = rawScienceExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        rawImfileRow    *object;
        bool            status;

        object = rawImfileRowAlloc("a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = rawImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        p1PendingExpRow *object;
        bool            status;

        object = p1PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = p1PendingExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        p2PendingExpRow *object;
        bool            status;

        object = p2PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", -32, -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = p2PendingExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        p2PendingImfileRow *object;
        bool            status;

        object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -32, -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = p2PendingImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        p2DoneExpRow    *object;
        bool            status;

        object = p2DoneExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", -32, -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = p2DoneExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        p2DoneImfileRow *object;
        bool            status;

        object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -32, -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = p2DoneImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        p3PendingExpRow *object;
        bool            status;

        object = p3PendingExpRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", -32, -32);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = p3PendingExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detRunRow       *object;
        bool            status;

        object = detRunRowAlloc("a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detRunMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (strncmp(psMetadataLookupPtr(&status, md, "det_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detInputExpRow  *object;
        bool            status;

        object = detInputExpRowAlloc(-32, -32, "a string", "a string", "a string", "a string", -32, "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detInputExpMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detProcessedImfileRow *object;
        bool            status;

        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detProcessedImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detStackedImfileRow *object;
        bool            status;

        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detStackedImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detNormalizedImfileRow *object;
        bool            status;

        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detNormalizedImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detMasterFrameRow *object;
        bool            status;

        object = detMasterFrameRowAlloc(-32, -32, "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detMasterFrameMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "comment"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detMasterImfileRow *object;
        bool            status;

        object = detMasterImfileRowAlloc(-32, "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detMasterImfileMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detResidImfileAnalysisRow *object;
        bool            status;

        object = detResidImfileAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", "a string");
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detResidImfileAnalysisMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    {
        psMetadata      *md;
        detResidExpAnalysisRow *object;
        bool            status;

        object = detResidExpAnalysisRowAlloc(-32, -32, "a string", "a string", "a string", true);
        if (!object) {
            exit(EXIT_FAILURE);
        }

        md = detResidExpAnalysisMetadataFromObject(object);
        if (!md) {
            exit(EXIT_FAILURE);
        }

        psFree(object);

        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataLookupBool(&status, md, "accept") == true) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

        psFree(md);
    }

    exit(EXIT_SUCCESS);
}
