IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 22, 2005, 2:56:34 PM (21 years ago)
Author:
jhoblitt
Message:

improved tests

File:
1 edited

Legend:

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

    r4192 r4355  
    44#include <[% pkg_name %].h>
    55#include <stdlib.h>
     6
     7#define MAX_STRING_LENGTH 1024
    68
    79int main ()
     
    2022    }
    2123
     24[% FOREACH item = columns -%]
     25[% IF item.type == "S32" or item.type == "F32" or item.type == "F64" or item.type == "BOOL" -%]
     26    if (!object->[% item.name %] == [% item.test %]) {
     27[% ELSIF item.type == "STR" -%]
     28    if (strncmp(object->[% item.name %], [% item.test %], MAX_STRING_LENGTH)) {
     29[% END -%]
     30        psFree(object);
     31        exit(EXIT_FAILURE);
     32    }
     33[% END -%]
     34
    2235    psFree(object);
    2336
Note: See TracChangeset for help on using the changeset viewer.