IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 17, 2006, 2:19:43 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.56

File:
1 edited

Legend:

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

    r9970 r10060  
    1313        bool            status;
    1414
    15         object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
     15        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32);
    1616        if (!object) {
    1717            exit(EXIT_FAILURE);
     
    4848            exit(EXIT_FAILURE);
    4949        }
     50        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
     51            psFree(md);
     52            exit(EXIT_FAILURE);
     53        }
     54
     55        psFree(md);
     56    }
     57
     58    {
     59        psMetadata      *md;
     60        summitImfileRow *object;
     61        bool            status;
     62
     63        object = summitImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
     64        if (!object) {
     65            exit(EXIT_FAILURE);
     66        }
     67
     68        md = summitImfileMetadataFromObject(object);
     69        if (!md) {
     70            exit(EXIT_FAILURE);
     71        }
     72
     73        psFree(object);
     74
     75        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     76            psFree(md);
     77            exit(EXIT_FAILURE);
     78        }
     79        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     80            psFree(md);
     81            exit(EXIT_FAILURE);
     82        }
     83        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     84            psFree(md);
     85            exit(EXIT_FAILURE);
     86        }
     87        if (!psMetadataLookupS32(&status, md, "bytes") == -32) {
     88            psFree(md);
     89            exit(EXIT_FAILURE);
     90        }
     91        if (strncmp(psMetadataLookupPtr(&status, md, "md5sum"), "a string", MAX_STRING_LENGTH)) {
     92            psFree(md);
     93            exit(EXIT_FAILURE);
     94        }
     95        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     96            psFree(md);
     97            exit(EXIT_FAILURE);
     98        }
     99        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
     100            psFree(md);
     101            exit(EXIT_FAILURE);
     102        }
     103        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     104            psFree(md);
     105            exit(EXIT_FAILURE);
     106        }
    50107
    51108        psFree(md);
     
    57114        bool            status;
    58115
    59         object = pzPendingExpRowAlloc("a string", "a string", "a string", "a string", -32);
     116        object = pzPendingExpRowAlloc("a string", "a string", "a string");
    60117        if (!object) {
    61118            exit(EXIT_FAILURE);
     
    81138            exit(EXIT_FAILURE);
    82139        }
    83         if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    84             psFree(md);
    85             exit(EXIT_FAILURE);
    86         }
    87         if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
    88             psFree(md);
    89             exit(EXIT_FAILURE);
    90         }
    91140
    92141        psFree(md);
     
    98147        bool            status;
    99148
    100         object = pzPendingImfileRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
     149        object = pzPendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string");
    101150        if (!object) {
    102151            exit(EXIT_FAILURE);
     
    122171            exit(EXIT_FAILURE);
    123172        }
    124         if (!psMetadataLookupS32(&status, md, "bytes") == -32) {
    125             psFree(md);
    126             exit(EXIT_FAILURE);
    127         }
    128         if (strncmp(psMetadataLookupPtr(&status, md, "md5sum"), "a string", MAX_STRING_LENGTH)) {
    129             psFree(md);
    130             exit(EXIT_FAILURE);
    131         }
    132173        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
    133174            psFree(md);
     
    138179            exit(EXIT_FAILURE);
    139180        }
     181        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     182            psFree(md);
     183            exit(EXIT_FAILURE);
     184        }
     185
     186        psFree(md);
     187    }
     188
     189    {
     190        psMetadata      *md;
     191        pzDoneExpRow    *object;
     192        bool            status;
     193
     194        object = pzDoneExpRowAlloc("a string", "a string", "a string");
     195        if (!object) {
     196            exit(EXIT_FAILURE);
     197        }
     198
     199        md = pzDoneExpMetadataFromObject(object);
     200        if (!md) {
     201            exit(EXIT_FAILURE);
     202        }
     203
     204        psFree(object);
     205
     206        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     207            psFree(md);
     208            exit(EXIT_FAILURE);
     209        }
     210        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     211            psFree(md);
     212            exit(EXIT_FAILURE);
     213        }
     214        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     215            psFree(md);
     216            exit(EXIT_FAILURE);
     217        }
     218
     219        psFree(md);
     220    }
     221
     222    {
     223        psMetadata      *md;
     224        pzDoneImfileRow *object;
     225        bool            status;
     226
     227        object = pzDoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", "a string");
     228        if (!object) {
     229            exit(EXIT_FAILURE);
     230        }
     231
     232        md = pzDoneImfileMetadataFromObject(object);
     233        if (!md) {
     234            exit(EXIT_FAILURE);
     235        }
     236
     237        psFree(object);
     238
     239        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     240            psFree(md);
     241            exit(EXIT_FAILURE);
     242        }
     243        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     244            psFree(md);
     245            exit(EXIT_FAILURE);
     246        }
     247        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     248            psFree(md);
     249            exit(EXIT_FAILURE);
     250        }
     251        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     252            psFree(md);
     253            exit(EXIT_FAILURE);
     254        }
     255        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
     256            psFree(md);
     257            exit(EXIT_FAILURE);
     258        }
     259        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     260            psFree(md);
     261            exit(EXIT_FAILURE);
     262        }
    140263        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    141264            psFree(md);
     
    151274        bool            status;
    152275
    153         object = newExpRowAlloc("a string", "a string", "a string", "a string", "a string", -32);
     276        object = newExpRowAlloc(64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32);
    154277        if (!object) {
    155278            exit(EXIT_FAILURE);
     
    163286        psFree(object);
    164287
    165         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    166288            psFree(md);
    167289            exit(EXIT_FAILURE);
     
    176298        }
    177299        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     300            psFree(md);
     301            exit(EXIT_FAILURE);
     302        }
    178303            psFree(md);
    179304            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.