IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2006, 11:32:26 AM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.47

File:
1 edited

Legend:

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

    r9242 r9301  
    11241124    {
    11251125        psMetadata      *md;
     1126        p3ProcessedExpRow *object;
     1127        bool            status;
     1128
     1129        object = p3ProcessedExpRowAlloc("a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", -32, -32);
     1130        if (!object) {
     1131            exit(EXIT_FAILURE);
     1132        }
     1133
     1134        md = p3ProcessedExpMetadataFromObject(object);
     1135        if (!md) {
     1136            exit(EXIT_FAILURE);
     1137        }
     1138
     1139        psFree(object);
     1140
     1141        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     1142            psFree(md);
     1143            exit(EXIT_FAILURE);
     1144        }
     1145        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     1146            psFree(md);
     1147            exit(EXIT_FAILURE);
     1148        }
     1149        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     1150            psFree(md);
     1151            exit(EXIT_FAILURE);
     1152        }
     1153        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
     1154            psFree(md);
     1155            exit(EXIT_FAILURE);
     1156        }
     1157        if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
     1158            psFree(md);
     1159            exit(EXIT_FAILURE);
     1160        }
     1161        if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
     1162            psFree(md);
     1163            exit(EXIT_FAILURE);
     1164        }
     1165        if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
     1166            psFree(md);
     1167            exit(EXIT_FAILURE);
     1168        }
     1169        if (!psMetadataLookupF32(&status, md, "sigma_dec") == 32.32) {
     1170            psFree(md);
     1171            exit(EXIT_FAILURE);
     1172        }
     1173        if (!psMetadataLookupS32(&status, md, "nastro") == -32) {
     1174            psFree(md);
     1175            exit(EXIT_FAILURE);
     1176        }
     1177        if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
     1178            psFree(md);
     1179            exit(EXIT_FAILURE);
     1180        }
     1181        if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) {
     1182            psFree(md);
     1183            exit(EXIT_FAILURE);
     1184        }
     1185        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     1186            psFree(md);
     1187            exit(EXIT_FAILURE);
     1188        }
     1189        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
     1190            psFree(md);
     1191            exit(EXIT_FAILURE);
     1192        }
     1193
     1194        psFree(md);
     1195    }
     1196
     1197    {
     1198        psMetadata      *md;
    11261199        detRunRow       *object;
    11271200        bool            status;
Note: See TracChangeset for help on using the changeset viewer.