IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 2, 2006, 2:47:23 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/jhoblitt/ippdb/tests/metadatafromobject.c

    r8026 r8079  
    512512        bool            status;
    513513
    514         object = newExpRowAlloc("a string", "a string", "a string", "a string", -32);
     514        object = newExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string");
    515515        if (!object) {
    516516            exit(EXIT_FAILURE);
     
    544544            exit(EXIT_FAILURE);
    545545        }
     546        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     547            psFree(md);
     548            exit(EXIT_FAILURE);
     549        }
    546550
    547551        psFree(md);
     
    590594        bool            status;
    591595
    592         object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string");
     596        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32);
    593597        if (!object) {
    594598            exit(EXIT_FAILURE);
     
    626630            exit(EXIT_FAILURE);
    627631        }
     632        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     633            psFree(md);
     634            exit(EXIT_FAILURE);
     635        }
     636        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     637            psFree(md);
     638            exit(EXIT_FAILURE);
     639        }
     640        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     641            psFree(md);
     642            exit(EXIT_FAILURE);
     643        }
     644        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     645            psFree(md);
     646            exit(EXIT_FAILURE);
     647        }
     648        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
     649            psFree(md);
     650            exit(EXIT_FAILURE);
     651        }
     652
     653        psFree(md);
     654    }
     655
     656    {
     657        psMetadata      *md;
     658        rawScienceExpRow *object;
     659        bool            status;
     660
     661        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32);
     662        if (!object) {
     663            exit(EXIT_FAILURE);
     664        }
     665
     666        md = rawScienceExpMetadataFromObject(object);
     667        if (!md) {
     668            exit(EXIT_FAILURE);
     669        }
     670
     671        psFree(object);
     672
     673        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     674            psFree(md);
     675            exit(EXIT_FAILURE);
     676        }
     677        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     678            psFree(md);
     679            exit(EXIT_FAILURE);
     680        }
     681        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     682            psFree(md);
     683            exit(EXIT_FAILURE);
     684        }
     685        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
     686            psFree(md);
     687            exit(EXIT_FAILURE);
     688        }
     689        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
     690            psFree(md);
     691            exit(EXIT_FAILURE);
     692        }
     693        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
     694            psFree(md);
     695            exit(EXIT_FAILURE);
     696        }
     697        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     698            psFree(md);
     699            exit(EXIT_FAILURE);
     700        }
     701        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     702            psFree(md);
     703            exit(EXIT_FAILURE);
     704        }
     705        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     706            psFree(md);
     707            exit(EXIT_FAILURE);
     708        }
     709        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     710            psFree(md);
     711            exit(EXIT_FAILURE);
     712        }
     713        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
     714            psFree(md);
     715            exit(EXIT_FAILURE);
     716        }
     717
     718        psFree(md);
     719    }
     720
     721    {
     722        psMetadata      *md;
     723        rawImfileRow    *object;
     724        bool            status;
     725
     726        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string");
     727        if (!object) {
     728            exit(EXIT_FAILURE);
     729        }
     730
     731        md = rawImfileMetadataFromObject(object);
     732        if (!md) {
     733            exit(EXIT_FAILURE);
     734        }
     735
     736        psFree(object);
     737
     738        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     739            psFree(md);
     740            exit(EXIT_FAILURE);
     741        }
     742        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     743            psFree(md);
     744            exit(EXIT_FAILURE);
     745        }
     746        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
     747            psFree(md);
     748            exit(EXIT_FAILURE);
     749        }
     750        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     751            psFree(md);
     752            exit(EXIT_FAILURE);
     753        }
    628754        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    629755            psFree(md);
     
    636762    {
    637763        psMetadata      *md;
    638         rawScienceExpRow *object;
    639         bool            status;
    640 
    641         object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string");
    642         if (!object) {
    643             exit(EXIT_FAILURE);
    644         }
    645 
    646         md = rawScienceExpMetadataFromObject(object);
     764        p1PendingExpRow *object;
     765        bool            status;
     766
     767        object = p1PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32, "a string", -32);
     768        if (!object) {
     769            exit(EXIT_FAILURE);
     770        }
     771
     772        md = p1PendingExpMetadataFromObject(object);
    647773        if (!md) {
    648774            exit(EXIT_FAILURE);
     
    675801            exit(EXIT_FAILURE);
    676802        }
     803        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     804            psFree(md);
     805            exit(EXIT_FAILURE);
     806        }
     807        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     808            psFree(md);
     809            exit(EXIT_FAILURE);
     810        }
     811        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     812            psFree(md);
     813            exit(EXIT_FAILURE);
     814        }
     815        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     816            psFree(md);
     817            exit(EXIT_FAILURE);
     818        }
     819        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
     820            psFree(md);
     821            exit(EXIT_FAILURE);
     822        }
     823        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     824            psFree(md);
     825            exit(EXIT_FAILURE);
     826        }
     827        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     828            psFree(md);
     829            exit(EXIT_FAILURE);
     830        }
     831
     832        psFree(md);
     833    }
     834
     835    {
     836        psMetadata      *md;
     837        p2PendingExpRow *object;
     838        bool            status;
     839
     840        object = p2PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32, "a string", -32, -32);
     841        if (!object) {
     842            exit(EXIT_FAILURE);
     843        }
     844
     845        md = p2PendingExpMetadataFromObject(object);
     846        if (!md) {
     847            exit(EXIT_FAILURE);
     848        }
     849
     850        psFree(object);
     851
     852        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     853            psFree(md);
     854            exit(EXIT_FAILURE);
     855        }
     856        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     857            psFree(md);
     858            exit(EXIT_FAILURE);
     859        }
     860        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     861            psFree(md);
     862            exit(EXIT_FAILURE);
     863        }
     864        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
     865            psFree(md);
     866            exit(EXIT_FAILURE);
     867        }
     868        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
     869            psFree(md);
     870            exit(EXIT_FAILURE);
     871        }
     872        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
     873            psFree(md);
     874            exit(EXIT_FAILURE);
     875        }
     876        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     877            psFree(md);
     878            exit(EXIT_FAILURE);
     879        }
     880        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     881            psFree(md);
     882            exit(EXIT_FAILURE);
     883        }
     884        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     885            psFree(md);
     886            exit(EXIT_FAILURE);
     887        }
     888        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     889            psFree(md);
     890            exit(EXIT_FAILURE);
     891        }
     892        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
     893            psFree(md);
     894            exit(EXIT_FAILURE);
     895        }
     896        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     897            psFree(md);
     898            exit(EXIT_FAILURE);
     899        }
     900        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     901            psFree(md);
     902            exit(EXIT_FAILURE);
     903        }
     904        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     905            psFree(md);
     906            exit(EXIT_FAILURE);
     907        }
     908
     909        psFree(md);
     910    }
     911
     912    {
     913        psMetadata      *md;
     914        p2PendingImfileRow *object;
     915        bool            status;
     916
     917        object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -32, -32);
     918        if (!object) {
     919            exit(EXIT_FAILURE);
     920        }
     921
     922        md = p2PendingImfileMetadataFromObject(object);
     923        if (!md) {
     924            exit(EXIT_FAILURE);
     925        }
     926
     927        psFree(object);
     928
     929        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     930            psFree(md);
     931            exit(EXIT_FAILURE);
     932        }
     933        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
     934            psFree(md);
     935            exit(EXIT_FAILURE);
     936        }
     937        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     938            psFree(md);
     939            exit(EXIT_FAILURE);
     940        }
    677941        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    678942            psFree(md);
    679943            exit(EXIT_FAILURE);
    680944        }
    681 
    682         psFree(md);
    683     }
    684 
    685     {
    686         psMetadata      *md;
    687         rawImfileRow    *object;
    688         bool            status;
    689 
    690         object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string");
    691         if (!object) {
    692             exit(EXIT_FAILURE);
    693         }
    694 
    695         md = rawImfileMetadataFromObject(object);
    696         if (!md) {
    697             exit(EXIT_FAILURE);
    698         }
    699 
    700         psFree(object);
    701 
    702         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     945        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     946            psFree(md);
     947            exit(EXIT_FAILURE);
     948        }
     949        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     950            psFree(md);
     951            exit(EXIT_FAILURE);
     952        }
     953        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     954            psFree(md);
     955            exit(EXIT_FAILURE);
     956        }
     957
     958        psFree(md);
     959    }
     960
     961    {
     962        psMetadata      *md;
     963        p2DoneExpRow    *object;
     964        bool            status;
     965
     966        object = p2DoneExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32, "a string", -32, -32);
     967        if (!object) {
     968            exit(EXIT_FAILURE);
     969        }
     970
     971        md = p2DoneExpMetadataFromObject(object);
     972        if (!md) {
     973            exit(EXIT_FAILURE);
     974        }
     975
     976        psFree(object);
     977
     978        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     979            psFree(md);
     980            exit(EXIT_FAILURE);
     981        }
     982        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     983            psFree(md);
     984            exit(EXIT_FAILURE);
     985        }
     986        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
     987            psFree(md);
     988            exit(EXIT_FAILURE);
     989        }
     990        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
     991            psFree(md);
     992            exit(EXIT_FAILURE);
     993        }
     994        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
     995            psFree(md);
     996            exit(EXIT_FAILURE);
     997        }
     998        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    703999            psFree(md);
    7041000            exit(EXIT_FAILURE);
     
    7081004            exit(EXIT_FAILURE);
    7091005        }
     1006        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     1007            psFree(md);
     1008            exit(EXIT_FAILURE);
     1009        }
     1010        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     1011            psFree(md);
     1012            exit(EXIT_FAILURE);
     1013        }
     1014        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     1015            psFree(md);
     1016            exit(EXIT_FAILURE);
     1017        }
     1018        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
     1019            psFree(md);
     1020            exit(EXIT_FAILURE);
     1021        }
     1022        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     1023            psFree(md);
     1024            exit(EXIT_FAILURE);
     1025        }
     1026        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     1027            psFree(md);
     1028            exit(EXIT_FAILURE);
     1029        }
     1030        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     1031            psFree(md);
     1032            exit(EXIT_FAILURE);
     1033        }
     1034
     1035        psFree(md);
     1036    }
     1037
     1038    {
     1039        psMetadata      *md;
     1040        p2DoneImfileRow *object;
     1041        bool            status;
     1042
     1043        object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -32, -32);
     1044        if (!object) {
     1045            exit(EXIT_FAILURE);
     1046        }
     1047
     1048        md = p2DoneImfileMetadataFromObject(object);
     1049        if (!md) {
     1050            exit(EXIT_FAILURE);
     1051        }
     1052
     1053        psFree(object);
     1054
     1055        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     1056            psFree(md);
     1057            exit(EXIT_FAILURE);
     1058        }
    7101059        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
    7111060            psFree(md);
     
    7201069            exit(EXIT_FAILURE);
    7211070        }
    722 
    723         psFree(md);
    724     }
    725 
    726     {
    727         psMetadata      *md;
    728         p1PendingExpRow *object;
    729         bool            status;
    730 
    731         object = p1PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", -32);
    732         if (!object) {
    733             exit(EXIT_FAILURE);
    734         }
    735 
    736         md = p1PendingExpMetadataFromObject(object);
     1071        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     1072            psFree(md);
     1073            exit(EXIT_FAILURE);
     1074        }
     1075        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     1076            psFree(md);
     1077            exit(EXIT_FAILURE);
     1078        }
     1079        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     1080            psFree(md);
     1081            exit(EXIT_FAILURE);
     1082        }
     1083
     1084        psFree(md);
     1085    }
     1086
     1087    {
     1088        psMetadata      *md;
     1089        p3PendingExpRow *object;
     1090        bool            status;
     1091
     1092        object = p3PendingExpRowAlloc("a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32, "a string", -32, -32);
     1093        if (!object) {
     1094            exit(EXIT_FAILURE);
     1095        }
     1096
     1097        md = p3PendingExpMetadataFromObject(object);
    7371098        if (!md) {
    7381099            exit(EXIT_FAILURE);
     
    7491110            exit(EXIT_FAILURE);
    7501111        }
     1112        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
     1113            psFree(md);
     1114            exit(EXIT_FAILURE);
     1115        }
     1116        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
     1117            psFree(md);
     1118            exit(EXIT_FAILURE);
     1119        }
     1120        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
     1121            psFree(md);
     1122            exit(EXIT_FAILURE);
     1123        }
     1124        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     1125            psFree(md);
     1126            exit(EXIT_FAILURE);
     1127        }
     1128        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     1129            psFree(md);
     1130            exit(EXIT_FAILURE);
     1131        }
     1132        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     1133            psFree(md);
     1134            exit(EXIT_FAILURE);
     1135        }
     1136        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     1137            psFree(md);
     1138            exit(EXIT_FAILURE);
     1139        }
     1140        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
     1141            psFree(md);
     1142            exit(EXIT_FAILURE);
     1143        }
     1144        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     1145            psFree(md);
     1146            exit(EXIT_FAILURE);
     1147        }
     1148        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     1149            psFree(md);
     1150            exit(EXIT_FAILURE);
     1151        }
     1152        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
     1153            psFree(md);
     1154            exit(EXIT_FAILURE);
     1155        }
     1156
     1157        psFree(md);
     1158    }
     1159
     1160    {
     1161        psMetadata      *md;
     1162        detRunRow       *object;
     1163        bool            status;
     1164
     1165        object = detRunRowAlloc(-32, "a string");
     1166        if (!object) {
     1167            exit(EXIT_FAILURE);
     1168        }
     1169
     1170        md = detRunMetadataFromObject(object);
     1171        if (!md) {
     1172            exit(EXIT_FAILURE);
     1173        }
     1174
     1175        psFree(object);
     1176
     1177        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
     1178            psFree(md);
     1179            exit(EXIT_FAILURE);
     1180        }
     1181        if (strncmp(psMetadataLookupPtr(&status, md, "det_type"), "a string", MAX_STRING_LENGTH)) {
     1182            psFree(md);
     1183            exit(EXIT_FAILURE);
     1184        }
     1185
     1186        psFree(md);
     1187    }
     1188
     1189    {
     1190        psMetadata      *md;
     1191        detInputExpRow  *object;
     1192        bool            status;
     1193
     1194        object = detInputExpRowAlloc(-32, -32, "a string", "a string", "a string", "a string", -32, "a string", "a string", 32.32, 32.32, 32.32, 32.32);
     1195        if (!object) {
     1196            exit(EXIT_FAILURE);
     1197        }
     1198
     1199        md = detInputExpMetadataFromObject(object);
     1200        if (!md) {
     1201            exit(EXIT_FAILURE);
     1202        }
     1203
     1204        psFree(object);
     1205
     1206        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
     1207            psFree(md);
     1208            exit(EXIT_FAILURE);
     1209        }
     1210        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
     1211            psFree(md);
     1212            exit(EXIT_FAILURE);
     1213        }
     1214        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     1215            psFree(md);
     1216            exit(EXIT_FAILURE);
     1217        }
     1218        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
     1219            psFree(md);
     1220            exit(EXIT_FAILURE);
     1221        }
    7511222        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
    7521223            psFree(md);
     
    7651236            exit(EXIT_FAILURE);
    7661237        }
    767         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    768             psFree(md);
    769             exit(EXIT_FAILURE);
    770         }
    771         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    772             psFree(md);
    773             exit(EXIT_FAILURE);
    774         }
    775         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    776             psFree(md);
    777             exit(EXIT_FAILURE);
    778         }
    779 
    780         psFree(md);
    781     }
    782 
    783     {
    784         psMetadata      *md;
    785         p2PendingExpRow *object;
    786         bool            status;
    787 
    788         object = p2PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", -32, -32);
    789         if (!object) {
    790             exit(EXIT_FAILURE);
    791         }
    792 
    793         md = p2PendingExpMetadataFromObject(object);
    794         if (!md) {
    795             exit(EXIT_FAILURE);
    796         }
    797 
    798         psFree(object);
    799 
    800         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
    801             psFree(md);
    802             exit(EXIT_FAILURE);
    803         }
    804         if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
    805             psFree(md);
    806             exit(EXIT_FAILURE);
    807         }
    808         if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
    809             psFree(md);
    810             exit(EXIT_FAILURE);
    811         }
    812         if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    813             psFree(md);
    814             exit(EXIT_FAILURE);
    815         }
    816         if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
    817             psFree(md);
    818             exit(EXIT_FAILURE);
    819         }
    820         if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    821             psFree(md);
    822             exit(EXIT_FAILURE);
    823         }
    824         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    825             psFree(md);
    826             exit(EXIT_FAILURE);
    827         }
    828         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    829             psFree(md);
    830             exit(EXIT_FAILURE);
    831         }
    832         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    833             psFree(md);
    834             exit(EXIT_FAILURE);
    835         }
    836         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    837             psFree(md);
    838             exit(EXIT_FAILURE);
    839         }
    840 
    841         psFree(md);
    842     }
    843 
    844     {
    845         psMetadata      *md;
    846         p2PendingImfileRow *object;
    847         bool            status;
    848 
    849         object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -32, -32);
    850         if (!object) {
    851             exit(EXIT_FAILURE);
    852         }
    853 
    854         md = p2PendingImfileMetadataFromObject(object);
    855         if (!md) {
    856             exit(EXIT_FAILURE);
    857         }
    858 
    859         psFree(object);
    860 
    861         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
    862             psFree(md);
    863             exit(EXIT_FAILURE);
    864         }
    865         if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
    866             psFree(md);
    867             exit(EXIT_FAILURE);
    868         }
    869         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    870             psFree(md);
    871             exit(EXIT_FAILURE);
    872         }
    873         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    874             psFree(md);
    875             exit(EXIT_FAILURE);
    876         }
    877         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    878             psFree(md);
    879             exit(EXIT_FAILURE);
    880         }
    881         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    882             psFree(md);
    883             exit(EXIT_FAILURE);
    884         }
    885         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    886             psFree(md);
    887             exit(EXIT_FAILURE);
    888         }
    889 
    890         psFree(md);
    891     }
    892 
    893     {
    894         psMetadata      *md;
    895         p2DoneExpRow    *object;
    896         bool            status;
    897 
    898         object = p2DoneExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", -32, -32);
    899         if (!object) {
    900             exit(EXIT_FAILURE);
    901         }
    902 
    903         md = p2DoneExpMetadataFromObject(object);
    904         if (!md) {
    905             exit(EXIT_FAILURE);
    906         }
    907 
    908         psFree(object);
    909 
    910         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
    911             psFree(md);
    912             exit(EXIT_FAILURE);
    913         }
    914         if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
    915             psFree(md);
    916             exit(EXIT_FAILURE);
    917         }
    918         if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
    919             psFree(md);
    920             exit(EXIT_FAILURE);
    921         }
    922         if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    923             psFree(md);
    924             exit(EXIT_FAILURE);
    925         }
    926         if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
    927             psFree(md);
    928             exit(EXIT_FAILURE);
    929         }
    930         if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    931             psFree(md);
    932             exit(EXIT_FAILURE);
    933         }
    934         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    935             psFree(md);
    936             exit(EXIT_FAILURE);
    937         }
    938         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    939             psFree(md);
    940             exit(EXIT_FAILURE);
    941         }
    942         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    943             psFree(md);
    944             exit(EXIT_FAILURE);
    945         }
    946         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    947             psFree(md);
    948             exit(EXIT_FAILURE);
    949         }
    950 
    951         psFree(md);
    952     }
    953 
    954     {
    955         psMetadata      *md;
    956         p2DoneImfileRow *object;
    957         bool            status;
    958 
    959         object = p2DoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", -32, -32);
    960         if (!object) {
    961             exit(EXIT_FAILURE);
    962         }
    963 
    964         md = p2DoneImfileMetadataFromObject(object);
    965         if (!md) {
    966             exit(EXIT_FAILURE);
    967         }
    968 
    969         psFree(object);
    970 
    971         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
    972             psFree(md);
    973             exit(EXIT_FAILURE);
    974         }
    975         if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
    976             psFree(md);
    977             exit(EXIT_FAILURE);
    978         }
    979         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    980             psFree(md);
    981             exit(EXIT_FAILURE);
    982         }
    983         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    984             psFree(md);
    985             exit(EXIT_FAILURE);
    986         }
    987         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    988             psFree(md);
    989             exit(EXIT_FAILURE);
    990         }
    991         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    992             psFree(md);
    993             exit(EXIT_FAILURE);
    994         }
    995         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    996             psFree(md);
    997             exit(EXIT_FAILURE);
    998         }
    999 
    1000         psFree(md);
    1001     }
    1002 
    1003     {
    1004         psMetadata      *md;
    1005         p3PendingExpRow *object;
    1006         bool            status;
    1007 
    1008         object = p3PendingExpRowAlloc("a string", "a string", "a string", -32, "a string", "a string", "a string", -32, -32);
    1009         if (!object) {
    1010             exit(EXIT_FAILURE);
    1011         }
    1012 
    1013         md = p3PendingExpMetadataFromObject(object);
    1014         if (!md) {
    1015             exit(EXIT_FAILURE);
    1016         }
    1017 
    1018         psFree(object);
    1019 
    1020         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
    1021             psFree(md);
    1022             exit(EXIT_FAILURE);
    1023         }
    1024         if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
    1025             psFree(md);
    1026             exit(EXIT_FAILURE);
    1027         }
    1028         if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    1029             psFree(md);
    1030             exit(EXIT_FAILURE);
    1031         }
    1032         if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
    1033             psFree(md);
    1034             exit(EXIT_FAILURE);
    1035         }
    1036         if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    1037             psFree(md);
    1038             exit(EXIT_FAILURE);
    1039         }
    1040         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
    1041             psFree(md);
    1042             exit(EXIT_FAILURE);
    1043         }
    1044         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    1045             psFree(md);
    1046             exit(EXIT_FAILURE);
    1047         }
    1048         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    1049             psFree(md);
    1050             exit(EXIT_FAILURE);
    1051         }
    1052         if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
    1053             psFree(md);
    1054             exit(EXIT_FAILURE);
    1055         }
    1056 
    1057         psFree(md);
    1058     }
    1059 
    1060     {
    1061         psMetadata      *md;
    1062         detRunRow       *object;
    1063         bool            status;
    1064 
    1065         object = detRunRowAlloc(-32, "a string");
    1066         if (!object) {
    1067             exit(EXIT_FAILURE);
    1068         }
    1069 
    1070         md = detRunMetadataFromObject(object);
    1071         if (!md) {
    1072             exit(EXIT_FAILURE);
    1073         }
    1074 
    1075         psFree(object);
    1076 
    1077         if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
    1078             psFree(md);
    1079             exit(EXIT_FAILURE);
    1080         }
    1081         if (strncmp(psMetadataLookupPtr(&status, md, "det_type"), "a string", MAX_STRING_LENGTH)) {
    1082             psFree(md);
    1083             exit(EXIT_FAILURE);
    1084         }
    1085 
    1086         psFree(md);
    1087     }
    1088 
    1089     {
    1090         psMetadata      *md;
    1091         detInputExpRow  *object;
    1092         bool            status;
    1093 
    1094         object = detInputExpRowAlloc(-32, -32, "a string", "a string", "a string", "a string", -32, "a string", "a string");
    1095         if (!object) {
    1096             exit(EXIT_FAILURE);
    1097         }
    1098 
    1099         md = detInputExpMetadataFromObject(object);
    1100         if (!md) {
    1101             exit(EXIT_FAILURE);
    1102         }
    1103 
    1104         psFree(object);
    1105 
    1106         if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
    1107             psFree(md);
    1108             exit(EXIT_FAILURE);
    1109         }
    1110         if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
    1111             psFree(md);
    1112             exit(EXIT_FAILURE);
    1113         }
    1114         if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
    1115             psFree(md);
    1116             exit(EXIT_FAILURE);
    1117         }
    1118         if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
    1119             psFree(md);
    1120             exit(EXIT_FAILURE);
    1121         }
    1122         if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
    1123             psFree(md);
    1124             exit(EXIT_FAILURE);
    1125         }
    1126         if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    1127             psFree(md);
    1128             exit(EXIT_FAILURE);
    1129         }
    1130         if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
    1131             psFree(md);
    1132             exit(EXIT_FAILURE);
    1133         }
    1134         if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    1135             psFree(md);
    1136             exit(EXIT_FAILURE);
    1137         }
    1138         if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
     1238        if (strncmp(psMetadataLookupPtr(&status, md, "class"), "a string", MAX_STRING_LENGTH)) {
     1239            psFree(md);
     1240            exit(EXIT_FAILURE);
     1241        }
     1242        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
     1243            psFree(md);
     1244            exit(EXIT_FAILURE);
     1245        }
     1246        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
     1247            psFree(md);
     1248            exit(EXIT_FAILURE);
     1249        }
     1250        if (!psMetadataLookupF32(&status, md, "dec") == 32.32) {
     1251            psFree(md);
     1252            exit(EXIT_FAILURE);
     1253        }
     1254        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
    11391255            psFree(md);
    11401256            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.