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

#define MAX_STRING_LENGTH 1024

int main ()
{
    {
        psMetadata      *md;
        expTagCounterRow *object;

        md = psMetadataAlloc();
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        summitExpRow    *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "imfiles", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->imfiles == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        summitImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "file_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "bytes", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "md5sum", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->file_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bytes == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->md5sum, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        pzPendingExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        pzPendingImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        pzDoneExpRow    *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        pzDoneImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        newExpRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "imfiles", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->imfiles == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        newImfileRow    *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        rawExpRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "imfiles", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "ra", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "decl", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "alt", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "az", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "ccd_temp", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "posang", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "object", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->imfiles == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->airmass == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ra == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->decl == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->exp_time == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->alt == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->az == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ccd_temp == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->posang == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->object, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        rawImfileRow    *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "ra", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "decl", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "alt", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "az", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "ccd_temp", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "posang", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "object", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->airmass == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ra == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->decl == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->exp_time == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->alt == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->az == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ccd_temp == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->posang == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->object, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p1PendingExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p1_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p1_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p2PendingExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p1_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p2_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p1_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p2_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p2PendingImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p1_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p2_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p1_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p2_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p2ProcessedExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p1_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p2_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p1_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p2_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p2MaskRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p2ProcessedImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p1_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p2_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p1_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p2_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p3PendingExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p2_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p2_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p3ProcessedExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sigma_ra", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sigma_dec", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "nastro", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "zp_mean", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "zp_stdev", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p2_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->sigma_ra == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->sigma_dec == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->nastro == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->zp_mean == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->zp_stdev == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p2_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p3MaskRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detRunRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "det_type", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "mode", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass_min", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass_max", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time_min", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time_max", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "ccd_temp_min", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "ccd_temp_max", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "posang_min", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "posang_max", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->det_type, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->mode, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->airmass_min == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->airmass_max == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->exp_time_min == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->exp_time_max == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ccd_temp_min == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ccd_temp_max == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->posang_min == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->posang_max == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detInputExpRow  *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAdd(md, PS_LIST_TAIL, "include", PS_DATA_BOOL, NULL, true)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->include == true) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detProcessedImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detProcessedExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detStackedImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detNormalizedStatImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF32(md, PS_LIST_TAIL, "norm", 0, NULL, 32.32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->norm == 32.32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detNormalizedImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detNormalizedExpRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detResidImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detResidExpRow  *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, true)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->accept == true) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        detRunSummaryRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, true)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->det_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->iteration == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->accept == true) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4aRunRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4a_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAdd(md, PS_LIST_TAIL, "magic", PS_DATA_BOOL, NULL, true)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4a_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->magic == true) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4aInputExpRow  *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4a_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4a_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4aScfileRow    *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4a_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "skycell_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4a_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4bRunRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4b_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAdd(md, PS_LIST_TAIL, "magic", PS_DATA_BOOL, NULL, true)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4b_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->magic == true) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4bInputScfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4b_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "skycell_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "kind", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4b_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->kind, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4bDiffScfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4b_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "skycell_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4b_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->bg_mean_stdev == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4cRunRow       *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4c_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAdd(md, PS_LIST_TAIL, "magic", PS_DATA_BOOL, NULL, true)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4c_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->magic == true) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4cInputExpRow  *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4c_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4c_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        p4MagicMaskImfileRow *object;

        md = psMetadataAlloc();
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p4c_id", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddS32(md, PS_LIST_TAIL, "p3_version", 0, NULL, -32)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (!object->p4c_id == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->p3_version == -32) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        skyCellRow      *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "skycell_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "ra1", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "decl1", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "ra2", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "decl2", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "ra3", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "decl3", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "ra4", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddF64(md, PS_LIST_TAIL, "decl4", 0, NULL, 64.64)) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ra1 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->decl1 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ra2 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->decl2 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ra3 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->decl3 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->ra4 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (!object->decl4 == 64.64) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    {
        psMetadata      *md;
        skyCellMapRow   *object;

        md = psMetadataAlloc();
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "skycell_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }
        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
            psFree(md);
            exit(EXIT_FAILURE);
        }

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

        psFree(md);

        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }
        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
            psFree(object);
            exit(EXIT_FAILURE);
        }

        psFree(object);
    }

    exit(EXIT_SUCCESS);
}
