IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 9, 2007, 12:13:45 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.4

File:
1 edited

Legend:

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

    r11720 r11733  
    590590        bool            status;
    591591
    592         object = p1PendingExpRowAlloc("a string", "a string", -32);
     592        object = p1PendingExpRowAlloc("a string", -32, "a string");
    593593        if (!object) {
    594594            exit(EXIT_FAILURE);
     
    606606            exit(EXIT_FAILURE);
    607607        }
     608        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     609            psFree(md);
     610            exit(EXIT_FAILURE);
     611        }
    608612        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    609613            psFree(md);
    610614            exit(EXIT_FAILURE);
    611615        }
     616
     617        psFree(md);
     618    }
     619
     620    {
     621        psMetadata      *md;
     622        p2PendingExpRow *object;
     623        bool            status;
     624
     625        object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string");
     626        if (!object) {
     627            exit(EXIT_FAILURE);
     628        }
     629
     630        md = p2PendingExpMetadataFromObject(object);
     631        if (!md) {
     632            exit(EXIT_FAILURE);
     633        }
     634
     635        psFree(object);
     636
     637        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     638            psFree(md);
     639            exit(EXIT_FAILURE);
     640        }
     641        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     642            psFree(md);
     643            exit(EXIT_FAILURE);
     644        }
    612645        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    613646            psFree(md);
    614647            exit(EXIT_FAILURE);
    615648        }
    616 
    617         psFree(md);
    618     }
    619 
    620     {
    621         psMetadata      *md;
    622         p2PendingExpRow *object;
    623         bool            status;
    624 
    625         object = p2PendingExpRowAlloc("a string", "a string", -32, -32, "a string");
    626         if (!object) {
    627             exit(EXIT_FAILURE);
    628         }
    629 
    630         md = p2PendingExpMetadataFromObject(object);
    631         if (!md) {
    632             exit(EXIT_FAILURE);
    633         }
    634 
    635         psFree(object);
    636 
    637         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     649        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    638650            psFree(md);
    639651            exit(EXIT_FAILURE);
     
    643655            exit(EXIT_FAILURE);
    644656        }
     657
     658        psFree(md);
     659    }
     660
     661    {
     662        psMetadata      *md;
     663        p2PendingImfileRow *object;
     664        bool            status;
     665
     666        object = p2PendingImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string");
     667        if (!object) {
     668            exit(EXIT_FAILURE);
     669        }
     670
     671        md = p2PendingImfileMetadataFromObject(object);
     672        if (!md) {
     673            exit(EXIT_FAILURE);
     674        }
     675
     676        psFree(object);
     677
     678        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     679            psFree(md);
     680            exit(EXIT_FAILURE);
     681        }
     682        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     683            psFree(md);
     684            exit(EXIT_FAILURE);
     685        }
    645686        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    646687            psFree(md);
    647688            exit(EXIT_FAILURE);
    648689        }
     690        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
     691            psFree(md);
     692            exit(EXIT_FAILURE);
     693        }
     694        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     695            psFree(md);
     696            exit(EXIT_FAILURE);
     697        }
     698        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     699            psFree(md);
     700            exit(EXIT_FAILURE);
     701        }
     702
     703        psFree(md);
     704    }
     705
     706    {
     707        psMetadata      *md;
     708        p2ProcessedExpRow *object;
     709        bool            status;
     710
     711        object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string");
     712        if (!object) {
     713            exit(EXIT_FAILURE);
     714        }
     715
     716        md = p2ProcessedExpMetadataFromObject(object);
     717        if (!md) {
     718            exit(EXIT_FAILURE);
     719        }
     720
     721        psFree(object);
     722
     723        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     724            psFree(md);
     725            exit(EXIT_FAILURE);
     726        }
    649727        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    650728            psFree(md);
    651729            exit(EXIT_FAILURE);
    652730        }
     731        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
     732            psFree(md);
     733            exit(EXIT_FAILURE);
     734        }
    653735        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    654736            psFree(md);
     
    661743    {
    662744        psMetadata      *md;
    663         p2PendingImfileRow *object;
    664         bool            status;
    665 
    666         object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32);
    667         if (!object) {
    668             exit(EXIT_FAILURE);
    669         }
    670 
    671         md = p2PendingImfileMetadataFromObject(object);
    672         if (!md) {
    673             exit(EXIT_FAILURE);
    674         }
    675 
    676         psFree(object);
    677 
    678         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     745        p2MaskRow       *object;
     746        bool            status;
     747
     748        object = p2MaskRowAlloc("a string");
     749        if (!object) {
     750            exit(EXIT_FAILURE);
     751        }
     752
     753        md = p2MaskMetadataFromObject(object);
     754        if (!md) {
     755            exit(EXIT_FAILURE);
     756        }
     757
     758        psFree(object);
     759
     760        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
     761            psFree(md);
     762            exit(EXIT_FAILURE);
     763        }
     764
     765        psFree(md);
     766    }
     767
     768    {
     769        psMetadata      *md;
     770        p2ProcessedImfileRow *object;
     771        bool            status;
     772
     773        object = p2ProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
     774        if (!object) {
     775            exit(EXIT_FAILURE);
     776        }
     777
     778        md = p2ProcessedImfileMetadataFromObject(object);
     779        if (!md) {
     780            exit(EXIT_FAILURE);
     781        }
     782
     783        psFree(object);
     784
     785        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     786            psFree(md);
     787            exit(EXIT_FAILURE);
     788        }
     789        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     790            psFree(md);
     791            exit(EXIT_FAILURE);
     792        }
     793        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    679794            psFree(md);
    680795            exit(EXIT_FAILURE);
     
    684799            exit(EXIT_FAILURE);
    685800        }
     801        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     802            psFree(md);
     803            exit(EXIT_FAILURE);
     804        }
    686805        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    687806            psFree(md);
    688807            exit(EXIT_FAILURE);
    689808        }
     809        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
     810            psFree(md);
     811            exit(EXIT_FAILURE);
     812        }
     813        if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
     814            psFree(md);
     815            exit(EXIT_FAILURE);
     816        }
     817        if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
     818            psFree(md);
     819            exit(EXIT_FAILURE);
     820        }
     821        if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
     822            psFree(md);
     823            exit(EXIT_FAILURE);
     824        }
     825        if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) {
     826            psFree(md);
     827            exit(EXIT_FAILURE);
     828        }
     829            psFree(md);
     830            exit(EXIT_FAILURE);
     831        }
     832
     833        psFree(md);
     834    }
     835
     836    {
     837        psMetadata      *md;
     838        p3PendingExpRow *object;
     839        bool            status;
     840
     841        object = p3PendingExpRowAlloc("a string", -32, -32, "a string");
     842        if (!object) {
     843            exit(EXIT_FAILURE);
     844        }
     845
     846        md = p3PendingExpMetadataFromObject(object);
     847        if (!md) {
     848            exit(EXIT_FAILURE);
     849        }
     850
     851        psFree(object);
     852
     853        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     854            psFree(md);
     855            exit(EXIT_FAILURE);
     856        }
     857        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
     858            psFree(md);
     859            exit(EXIT_FAILURE);
     860        }
     861        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     862            psFree(md);
     863            exit(EXIT_FAILURE);
     864        }
     865        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
     866            psFree(md);
     867            exit(EXIT_FAILURE);
     868        }
     869
     870        psFree(md);
     871    }
     872
     873    {
     874        psMetadata      *md;
     875        p3ProcessedExpRow *object;
     876        bool            status;
     877
     878        object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16);
     879        if (!object) {
     880            exit(EXIT_FAILURE);
     881        }
     882
     883        md = p3ProcessedExpMetadataFromObject(object);
     884        if (!md) {
     885            exit(EXIT_FAILURE);
     886        }
     887
     888        psFree(object);
     889
     890        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
     891            psFree(md);
     892            exit(EXIT_FAILURE);
     893        }
     894        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
     895            psFree(md);
     896            exit(EXIT_FAILURE);
     897        }
     898        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
     899            psFree(md);
     900            exit(EXIT_FAILURE);
     901        }
     902        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
     903            psFree(md);
     904            exit(EXIT_FAILURE);
     905        }
     906        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
     907            psFree(md);
     908            exit(EXIT_FAILURE);
     909        }
    690910        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    691911            psFree(md);
    692912            exit(EXIT_FAILURE);
    693913        }
    694         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    695             psFree(md);
    696             exit(EXIT_FAILURE);
    697         }
    698         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    699             psFree(md);
    700             exit(EXIT_FAILURE);
    701         }
    702 
    703         psFree(md);
    704     }
    705 
    706     {
    707         psMetadata      *md;
    708         p2ProcessedExpRow *object;
    709         bool            status;
    710 
    711         object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string");
    712         if (!object) {
    713             exit(EXIT_FAILURE);
    714         }
    715 
    716         md = p2ProcessedExpMetadataFromObject(object);
    717         if (!md) {
    718             exit(EXIT_FAILURE);
    719         }
    720 
    721         psFree(object);
    722 
    723         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    724             psFree(md);
    725             exit(EXIT_FAILURE);
    726         }
    727         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    728             psFree(md);
    729             exit(EXIT_FAILURE);
    730         }
    731         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    732             psFree(md);
    733             exit(EXIT_FAILURE);
    734         }
    735         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    736             psFree(md);
    737             exit(EXIT_FAILURE);
    738         }
    739 
    740         psFree(md);
    741     }
    742 
    743     {
    744         psMetadata      *md;
    745         p2MaskRow       *object;
    746         bool            status;
    747 
    748         object = p2MaskRowAlloc("a string");
    749         if (!object) {
    750             exit(EXIT_FAILURE);
    751         }
    752 
    753         md = p2MaskMetadataFromObject(object);
    754         if (!md) {
    755             exit(EXIT_FAILURE);
    756         }
    757 
    758         psFree(object);
    759 
    760         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    761             psFree(md);
    762             exit(EXIT_FAILURE);
    763         }
    764 
    765         psFree(md);
    766     }
    767 
    768     {
    769         psMetadata      *md;
    770         p2ProcessedImfileRow *object;
    771         bool            status;
    772 
    773         object = p2ProcessedImfileRowAlloc("a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -32, -32, -16);
    774         if (!object) {
    775             exit(EXIT_FAILURE);
    776         }
    777 
    778         md = p2ProcessedImfileMetadataFromObject(object);
    779         if (!md) {
    780             exit(EXIT_FAILURE);
    781         }
    782 
    783         psFree(object);
    784 
    785         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    786             psFree(md);
    787             exit(EXIT_FAILURE);
    788         }
    789         if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
    790             psFree(md);
    791             exit(EXIT_FAILURE);
    792         }
    793         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    794             psFree(md);
    795             exit(EXIT_FAILURE);
    796         }
    797         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    798             psFree(md);
    799             exit(EXIT_FAILURE);
    800         }
    801914        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
    802915            psFree(md);
     
    811924            exit(EXIT_FAILURE);
    812925        }
     926        if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
     927            psFree(md);
     928            exit(EXIT_FAILURE);
     929        }
     930        if (!psMetadataLookupF32(&status, md, "sigma_dec") == 32.32) {
     931            psFree(md);
     932            exit(EXIT_FAILURE);
     933        }
     934        if (!psMetadataLookupS32(&status, md, "nastro") == -32) {
     935            psFree(md);
     936            exit(EXIT_FAILURE);
     937        }
    813938        if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
    814939            psFree(md);
     
    819944            exit(EXIT_FAILURE);
    820945        }
    821         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
    822             psFree(md);
    823             exit(EXIT_FAILURE);
    824         }
    825         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    826             psFree(md);
    827             exit(EXIT_FAILURE);
    828         }
    829             psFree(md);
    830             exit(EXIT_FAILURE);
    831         }
    832 
    833         psFree(md);
    834     }
    835 
    836     {
    837         psMetadata      *md;
    838         p3PendingExpRow *object;
    839         bool            status;
    840 
    841         object = p3PendingExpRowAlloc("a string", -32, -32, "a string");
    842         if (!object) {
    843             exit(EXIT_FAILURE);
    844         }
    845 
    846         md = p3PendingExpMetadataFromObject(object);
    847         if (!md) {
    848             exit(EXIT_FAILURE);
    849         }
    850 
    851         psFree(object);
    852 
    853         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    854             psFree(md);
    855             exit(EXIT_FAILURE);
    856         }
    857         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    858             psFree(md);
    859             exit(EXIT_FAILURE);
    860         }
    861         if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
    862             psFree(md);
    863             exit(EXIT_FAILURE);
    864         }
    865         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    866             psFree(md);
    867             exit(EXIT_FAILURE);
    868         }
    869 
    870         psFree(md);
    871     }
    872 
    873     {
    874         psMetadata      *md;
    875         p3ProcessedExpRow *object;
    876         bool            status;
    877 
    878         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, 32.32, -32, -32, "a string", -16);
    879         if (!object) {
    880             exit(EXIT_FAILURE);
    881         }
    882 
    883         md = p3ProcessedExpMetadataFromObject(object);
    884         if (!md) {
    885             exit(EXIT_FAILURE);
    886         }
    887 
    888         psFree(object);
    889 
    890         if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
    891             psFree(md);
    892             exit(EXIT_FAILURE);
    893         }
    894         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
    895             psFree(md);
    896             exit(EXIT_FAILURE);
    897         }
    898         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
    899             psFree(md);
    900             exit(EXIT_FAILURE);
    901         }
    902         if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
    903             psFree(md);
    904             exit(EXIT_FAILURE);
    905         }
    906         if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
    907             psFree(md);
    908             exit(EXIT_FAILURE);
    909         }
    910         if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
    911             psFree(md);
    912             exit(EXIT_FAILURE);
    913         }
    914         if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
    915             psFree(md);
    916             exit(EXIT_FAILURE);
    917         }
    918         if (!psMetadataLookupF32(&status, md, "sigma_dec") == 32.32) {
    919             psFree(md);
    920             exit(EXIT_FAILURE);
    921         }
    922         if (!psMetadataLookupS32(&status, md, "nastro") == -32) {
    923             psFree(md);
    924             exit(EXIT_FAILURE);
    925         }
    926         if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
    927             psFree(md);
    928             exit(EXIT_FAILURE);
    929         }
    930         if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) {
    931             psFree(md);
    932             exit(EXIT_FAILURE);
    933         }
    934946        if (!psMetadataLookupF32(&status, md, "zp_mean") == 32.32) {
    935947            psFree(md);
     
    937949        }
    938950        if (!psMetadataLookupF32(&status, md, "zp_stdev") == 32.32) {
    939             psFree(md);
    940             exit(EXIT_FAILURE);
    941         }
    942         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
    943             psFree(md);
    944             exit(EXIT_FAILURE);
    945         }
    946         if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
    947             psFree(md);
    948             exit(EXIT_FAILURE);
    949         }
    950         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    951951            psFree(md);
    952952            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.