IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 20, 2006, 2:38:16 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.50

File:
1 edited

Legend:

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

    r9423 r9684  
    77    {
    88        psDB            *dbh;
    9         weatherRow      *object;
    10 
    11         dbh = psDBInit("localhost", "test", NULL, "test");
    12         if (!dbh) {
    13             exit(EXIT_FAILURE);
    14         }
    15 
    16         object = weatherRowAlloc(32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32);
    17         if (!object) {
    18             exit(EXIT_FAILURE);
    19         }
    20 
    21         if (!weatherInsertObject(dbh, object)) {
    22             exit(EXIT_FAILURE);
    23         }
    24 
    25         psFree(object);
    26         psDBCleanup(dbh);
    27     }
    28 
    29     {
    30         psDB            *dbh;
    31         skyp_transparencyRow *object;
    32 
    33         dbh = psDBInit("localhost", "test", NULL, "test");
    34         if (!dbh) {
    35             exit(EXIT_FAILURE);
    36         }
    37 
    38         object = skyp_transparencyRowAlloc("a string", 64.64, -32, 64.64, 64.64, 32.32, 64.64);
    39         if (!object) {
    40             exit(EXIT_FAILURE);
    41         }
    42 
    43         if (!skyp_transparencyInsertObject(dbh, object)) {
    44             exit(EXIT_FAILURE);
    45         }
    46 
    47         psFree(object);
    48         psDBCleanup(dbh);
    49     }
    50 
    51     {
    52         psDB            *dbh;
    53         skyp_absorptionRow *object;
    54 
    55         dbh = psDBInit("localhost", "test", NULL, "test");
    56         if (!dbh) {
    57             exit(EXIT_FAILURE);
    58         }
    59 
    60         object = skyp_absorptionRowAlloc("a string", 32.32, 32.32, 32.32, -32, 64.64, 64.64, 32.32, 64.64);
    61         if (!object) {
    62             exit(EXIT_FAILURE);
    63         }
    64 
    65         if (!skyp_absorptionInsertObject(dbh, object)) {
    66             exit(EXIT_FAILURE);
    67         }
    68 
    69         psFree(object);
    70         psDBCleanup(dbh);
    71     }
    72 
    73     {
    74         psDB            *dbh;
    75         skyp_emissionRow *object;
    76 
    77         dbh = psDBInit("localhost", "test", NULL, "test");
    78         if (!dbh) {
    79             exit(EXIT_FAILURE);
    80         }
    81 
    82         object = skyp_emissionRowAlloc("a string", 32.32, 32.32, 32.32, 32.32, 32.32);
    83         if (!object) {
    84             exit(EXIT_FAILURE);
    85         }
    86 
    87         if (!skyp_emissionInsertObject(dbh, object)) {
    88             exit(EXIT_FAILURE);
    89         }
    90 
    91         psFree(object);
    92         psDBCleanup(dbh);
    93     }
    94 
    95     {
    96         psDB            *dbh;
    97         dimmRow         *object;
    98 
    99         dbh = psDBInit("localhost", "test", NULL, "test");
    100         if (!dbh) {
    101             exit(EXIT_FAILURE);
    102         }
    103 
    104         object = dimmRowAlloc(32.32, 32.32, 32.32, 64.64, 64.64, 32.32, "a string");
    105         if (!object) {
    106             exit(EXIT_FAILURE);
    107         }
    108 
    109         if (!dimmInsertObject(dbh, object)) {
    110             exit(EXIT_FAILURE);
    111         }
    112 
    113         psFree(object);
    114         psDBCleanup(dbh);
    115     }
    116 
    117     {
    118         psDB            *dbh;
    119         skyp_irRow      *object;
    120 
    121         dbh = psDBInit("localhost", "test", NULL, "test");
    122         if (!dbh) {
    123             exit(EXIT_FAILURE);
    124         }
    125 
    126         object = skyp_irRowAlloc(64.64, 64.64, 64.64, 64.64, 32.32, 32.32);
    127         if (!object) {
    128             exit(EXIT_FAILURE);
    129         }
    130 
    131         if (!skyp_irInsertObject(dbh, object)) {
    132             exit(EXIT_FAILURE);
    133         }
    134 
    135         psFree(object);
    136         psDBCleanup(dbh);
    137     }
    138 
    139     {
    140         psDB            *dbh;
    141         domeRow         *object;
    142 
    143         dbh = psDBInit("localhost", "test", NULL, "test");
    144         if (!dbh) {
    145             exit(EXIT_FAILURE);
    146         }
    147 
    148         object = domeRowAlloc(32.32, true, true, true);
    149         if (!object) {
    150             exit(EXIT_FAILURE);
    151         }
    152 
    153         if (!domeInsertObject(dbh, object)) {
    154             exit(EXIT_FAILURE);
    155         }
    156 
    157         psFree(object);
    158         psDBCleanup(dbh);
    159     }
    160 
    161     {
    162         psDB            *dbh;
    163         telescopeRow    *object;
    164 
    165         dbh = psDBInit("localhost", "test", NULL, "test");
    166         if (!dbh) {
    167             exit(EXIT_FAILURE);
    168         }
    169 
    170         object = telescopeRowAlloc("a string", 32.32, 32.32, 64.64, 64.64);
    171         if (!object) {
    172             exit(EXIT_FAILURE);
    173         }
    174 
    175         if (!telescopeInsertObject(dbh, object)) {
    176             exit(EXIT_FAILURE);
    177         }
    178 
    179         psFree(object);
    180         psDBCleanup(dbh);
    181     }
    182 
    183     {
    184         psDB            *dbh;
    1859        summitExpRow    *object;
    18610
     
    300124        }
    301125
    302         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");
     126        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");
    303127        if (!object) {
    304128            exit(EXIT_FAILURE);
     
    322146        }
    323147
    324         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");
     148        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");
    325149        if (!object) {
    326150            exit(EXIT_FAILURE);
     
    344168        }
    345169
    346         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");
     170        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");
    347171        if (!object) {
    348172            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.