IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 21, 2008, 6:09:25 PM (18 years ago)
Author:
jhoblitt
Message:

update

File:
1 edited

Legend:

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

    r16177 r16587  
    7373    {
    7474        psDB            *dbh;
    75         pzPendingExpRow *object;
    76 
    77         dbh = psDBInit("localhost", "test", NULL, "test");
    78         if (!dbh) {
    79             exit(EXIT_FAILURE);
    80         }
    81 
    82         object = pzPendingExpRowAlloc("a string", "a string", "a string");
    83         if (!object) {
    84             exit(EXIT_FAILURE);
    85         }
    86 
    87         if (!pzPendingExpInsertObject(dbh, object)) {
    88             exit(EXIT_FAILURE);
    89         }
    90 
    91         psFree(object);
    92         psDBCleanup(dbh);
    93     }
    94 
    95     {
    96         psDB            *dbh;
    97         pzPendingImfileRow *object;
    98 
    99         dbh = psDBInit("localhost", "test", NULL, "test");
    100         if (!dbh) {
    101             exit(EXIT_FAILURE);
    102         }
    103 
    104         object = pzPendingImfileRowAlloc("a string", "a string", "a string", "a string", "a string");
    105         if (!object) {
    106             exit(EXIT_FAILURE);
    107         }
    108 
    109         if (!pzPendingImfileInsertObject(dbh, object)) {
    110             exit(EXIT_FAILURE);
    111         }
    112 
    113         psFree(object);
    114         psDBCleanup(dbh);
    115     }
    116 
    117     {
    118         psDB            *dbh;
    119         pzDoneExpRow    *object;
    120 
    121         dbh = psDBInit("localhost", "test", NULL, "test");
    122         if (!dbh) {
    123             exit(EXIT_FAILURE);
    124         }
    125 
    126         object = pzDoneExpRowAlloc("a string", "a string", "a string");
    127         if (!object) {
    128             exit(EXIT_FAILURE);
    129         }
    130 
    131         if (!pzDoneExpInsertObject(dbh, object)) {
    132             exit(EXIT_FAILURE);
    133         }
    134 
    135         psFree(object);
    136         psDBCleanup(dbh);
    137     }
    138 
    139     {
    140         psDB            *dbh;
    141         pzDoneImfileRow *object;
    142 
    143         dbh = psDBInit("localhost", "test", NULL, "test");
    144         if (!dbh) {
    145             exit(EXIT_FAILURE);
    146         }
    147 
    148         object = pzDoneImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string");
    149         if (!object) {
    150             exit(EXIT_FAILURE);
    151         }
    152 
    153         if (!pzDoneImfileInsertObject(dbh, object)) {
     75        pzDownloadExpRow *object;
     76
     77        dbh = psDBInit("localhost", "test", NULL, "test");
     78        if (!dbh) {
     79            exit(EXIT_FAILURE);
     80        }
     81
     82        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string");
     83        if (!object) {
     84            exit(EXIT_FAILURE);
     85        }
     86
     87        if (!pzDownloadExpInsertObject(dbh, object)) {
     88            exit(EXIT_FAILURE);
     89        }
     90
     91        psFree(object);
     92        psDBCleanup(dbh);
     93    }
     94
     95    {
     96        psDB            *dbh;
     97        pzDownloadImfileRow *object;
     98
     99        dbh = psDBInit("localhost", "test", NULL, "test");
     100        if (!dbh) {
     101            exit(EXIT_FAILURE);
     102        }
     103
     104        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16);
     105        if (!object) {
     106            exit(EXIT_FAILURE);
     107        }
     108
     109        if (!pzDownloadImfileInsertObject(dbh, object)) {
    154110            exit(EXIT_FAILURE);
    155111        }
     
    168124        }
    169125
    170         object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string");
     126        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string");
    171127        if (!object) {
    172128            exit(EXIT_FAILURE);
     
    300256        }
    301257
    302         object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, -32, -32, "a string", -16);
     258        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16);
    303259        if (!object) {
    304260            exit(EXIT_FAILURE);
     
    366322        }
    367323
    368         object = camProcessedExpRowAlloc(-64, -64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, -32, -32, "a string", -16);
     324        object = camProcessedExpRowAlloc(-64, -64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16);
    369325        if (!object) {
    370326            exit(EXIT_FAILURE);
     
    476432        }
    477433
    478         object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, true, -16);
     434        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, true, -16);
    479435        if (!object) {
    480436            exit(EXIT_FAILURE);
     
    542498        }
    543499
    544         object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 64.64, -16);
     500        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16);
    545501        if (!object) {
    546502            exit(EXIT_FAILURE);
     
    608564        }
    609565
    610         object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 64.64, -16);
     566        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16);
    611567        if (!object) {
    612568            exit(EXIT_FAILURE);
     
    11141070        }
    11151071
    1116         object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string");
     1072        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string");
    11171073        if (!object) {
    11181074            exit(EXIT_FAILURE);
     
    11421098
    11431099        if (!flatcorrExpInsertObject(dbh, object)) {
     1100            exit(EXIT_FAILURE);
     1101        }
     1102
     1103        psFree(object);
     1104        psDBCleanup(dbh);
     1105    }
     1106
     1107    {
     1108        psDB            *dbh;
     1109        pstampDataStoreRow *object;
     1110
     1111        dbh = psDBInit("localhost", "test", NULL, "test");
     1112        if (!dbh) {
     1113            exit(EXIT_FAILURE);
     1114        }
     1115
     1116        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string");
     1117        if (!object) {
     1118            exit(EXIT_FAILURE);
     1119        }
     1120
     1121        if (!pstampDataStoreInsertObject(dbh, object)) {
     1122            exit(EXIT_FAILURE);
     1123        }
     1124
     1125        psFree(object);
     1126        psDBCleanup(dbh);
     1127    }
     1128
     1129    {
     1130        psDB            *dbh;
     1131        pstampRequestRow *object;
     1132
     1133        dbh = psDBInit("localhost", "test", NULL, "test");
     1134        if (!dbh) {
     1135            exit(EXIT_FAILURE);
     1136        }
     1137
     1138        object = pstampRequestRowAlloc(-64, -64, "a string", "a string");
     1139        if (!object) {
     1140            exit(EXIT_FAILURE);
     1141        }
     1142
     1143        if (!pstampRequestInsertObject(dbh, object)) {
     1144            exit(EXIT_FAILURE);
     1145        }
     1146
     1147        psFree(object);
     1148        psDBCleanup(dbh);
     1149    }
     1150
     1151    {
     1152        psDB            *dbh;
     1153        pstampJobRow    *object;
     1154
     1155        dbh = psDBInit("localhost", "test", NULL, "test");
     1156        if (!dbh) {
     1157            exit(EXIT_FAILURE);
     1158        }
     1159
     1160        object = pstampJobRowAlloc(-64, -64, "a string", -32, "a string", "a string", "a string");
     1161        if (!object) {
     1162            exit(EXIT_FAILURE);
     1163        }
     1164
     1165        if (!pstampJobInsertObject(dbh, object)) {
    11441166            exit(EXIT_FAILURE);
    11451167        }
Note: See TracChangeset for help on using the changeset viewer.