IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 6, 2006, 6:46:10 PM (21 years ago)
Author:
jhoblitt
Message:

fix tests to work with per table data
minor pslib 0.9.0 compatibility fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/glueforge/templates/psdb/popobject_c.tt

    r5907 r5950  
    77int main ()
    88{
    9     psDB            *dbh;
    10     [% indented(table.object_name, "*object") %];
     9[% FOREACH table = tables -%]
     10    {
     11        psDB            *dbh;
     12        [% indented(table.object_name, "*object") %];
    1113
    12     dbh = psDBInit("localhost", "test", NULL, "test");
    13     if (!dbh) {
    14         exit(EXIT_FAILURE);
     14        dbh = psDBInit("localhost", "test", NULL, "test");
     15        if (!dbh) {
     16            exit(EXIT_FAILURE);
     17        }
     18
     19        object = [% table.namespace %]PopObject(dbh);
     20        if (!object) {
     21            exit(EXIT_FAILURE);
     22        }
     23
     24        psFree(object);
     25        psDBCleanup(dbh);
    1526    }
    1627
    17     object = [% table.namespace %]PopObject(dbh);
    18     if (!object) {
    19         exit(EXIT_FAILURE);
    20     }
    21 
    22     psFree(object);
    23     psDBCleanup(dbh);
    24 
     28[% END -%]
    2529    exit(EXIT_SUCCESS);
    2630}
Note: See TracChangeset for help on using the changeset viewer.