IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 11, 2007, 3:35:04 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.73

File:
1 edited

Legend:

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

    r11030 r11045  
    302302        bool            status;
    303303
    304         object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, -16);
     304        object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32);
    305305        if (!object) {
    306306            exit(EXIT_FAILURE);
     
    341341            exit(EXIT_FAILURE);
    342342        }
    343             psFree(md);
    344             exit(EXIT_FAILURE);
    345         }
    346343
    347344        psFree(md);
     
    353350        bool            status;
    354351
    355         object = newImfileRowAlloc("a string", "a string", "a string", "a string", -16);
     352        object = newImfileRowAlloc("a string", "a string", "a string", "a string");
    356353        if (!object) {
    357354            exit(EXIT_FAILURE);
     
    381378            exit(EXIT_FAILURE);
    382379        }
    383             psFree(md);
    384             exit(EXIT_FAILURE);
    385         }
    386 
    387         psFree(md);
    388     }
    389 
    390     {
    391         psMetadata      *md;
    392         rawDetrendExpRow *object;
    393         bool            status;
    394 
    395         object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z");
    396         if (!object) {
    397             exit(EXIT_FAILURE);
    398         }
    399 
    400         md = rawDetrendExpMetadataFromObject(object);
     380
     381        psFree(md);
     382    }
     383
     384    {
     385        psMetadata      *md;
     386        rawExpRow       *object;
     387        bool            status;
     388
     389        object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16);
     390        if (!object) {
     391            exit(EXIT_FAILURE);
     392        }
     393
     394        md = rawExpMetadataFromObject(object);
    401395        if (!md) {
    402396            exit(EXIT_FAILURE);
     
    480474            exit(EXIT_FAILURE);
    481475        }
    482 
    483         psFree(md);
    484     }
    485 
    486     {
    487         psMetadata      *md;
    488         rawScienceExpRow *object;
    489         bool            status;
    490 
    491         object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z");
    492         if (!object) {
    493             exit(EXIT_FAILURE);
    494         }
    495 
    496         md = rawScienceExpMetadataFromObject(object);
    497         if (!md) {
    498             exit(EXIT_FAILURE);
    499         }
    500 
    501         psFree(object);
    502 
    503         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    504             psFree(md);
    505             exit(EXIT_FAILURE);
    506         }
    507         if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
    508             psFree(md);
    509             exit(EXIT_FAILURE);
    510         }
    511         if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     476            psFree(md);
     477            exit(EXIT_FAILURE);
     478        }
     479
     480        psFree(md);
     481    }
     482
     483    {
     484        psMetadata      *md;
     485        rawImfileRow    *object;
     486        bool            status;
     487
     488        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16);
     489        if (!object) {
     490            exit(EXIT_FAILURE);
     491        }
     492
     493        md = rawImfileMetadataFromObject(object);
     494        if (!md) {
     495            exit(EXIT_FAILURE);
     496        }
     497
     498        psFree(object);
     499
     500        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     501            psFree(md);
     502            exit(EXIT_FAILURE);
     503        }
     504        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     505            psFree(md);
     506            exit(EXIT_FAILURE);
     507        }
     508        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
     509            psFree(md);
     510            exit(EXIT_FAILURE);
     511        }
     512        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    512513            psFree(md);
    513514            exit(EXIT_FAILURE);
     
    517518            exit(EXIT_FAILURE);
    518519        }
    519         if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
    520             psFree(md);
    521             exit(EXIT_FAILURE);
    522         }
    523520        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    524521            psFree(md);
     
    573570            exit(EXIT_FAILURE);
    574571        }
    575             psFree(md);
    576             exit(EXIT_FAILURE);
    577         }
    578 
    579         psFree(md);
    580     }
    581 
    582     {
    583         psMetadata      *md;
    584         rawImfileRow    *object;
    585         bool            status;
    586 
    587         object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z");
    588         if (!object) {
    589             exit(EXIT_FAILURE);
    590         }
    591 
    592         md = rawImfileMetadataFromObject(object);
    593         if (!md) {
    594             exit(EXIT_FAILURE);
    595         }
    596 
    597         psFree(object);
    598 
    599         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    600             psFree(md);
    601             exit(EXIT_FAILURE);
    602         }
    603         if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
    604             psFree(md);
    605             exit(EXIT_FAILURE);
    606         }
    607         if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
    608             psFree(md);
    609             exit(EXIT_FAILURE);
    610         }
    611         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    612             psFree(md);
    613             exit(EXIT_FAILURE);
    614         }
    615         if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    616             psFree(md);
    617             exit(EXIT_FAILURE);
    618         }
    619         if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    620             psFree(md);
    621             exit(EXIT_FAILURE);
    622         }
    623         if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
    624             psFree(md);
    625             exit(EXIT_FAILURE);
    626         }
    627         if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
    628             psFree(md);
    629             exit(EXIT_FAILURE);
    630         }
    631         if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
    632             psFree(md);
    633             exit(EXIT_FAILURE);
    634         }
    635         if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
    636             psFree(md);
    637             exit(EXIT_FAILURE);
    638         }
    639         if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
    640             psFree(md);
    641             exit(EXIT_FAILURE);
    642         }
    643         if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
    644             psFree(md);
    645             exit(EXIT_FAILURE);
    646         }
    647         if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
    648             psFree(md);
    649             exit(EXIT_FAILURE);
    650         }
    651         if (!psMetadataLookupF64(&status, md, "alt") == 64.64) {
    652             psFree(md);
    653             exit(EXIT_FAILURE);
    654         }
    655         if (!psMetadataLookupF64(&status, md, "az") == 64.64) {
    656             psFree(md);
    657             exit(EXIT_FAILURE);
    658         }
    659         if (!psMetadataLookupF32(&status, md, "ccd_temp") == 32.32) {
    660             psFree(md);
    661             exit(EXIT_FAILURE);
    662         }
    663         if (!psMetadataLookupF64(&status, md, "posang") == 64.64) {
    664             psFree(md);
    665             exit(EXIT_FAILURE);
    666         }
    667         if (strncmp(psMetadataLookupPtr(&status, md, "object"), "a string", MAX_STRING_LENGTH)) {
    668572            psFree(md);
    669573            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.