IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2006, 12:09:49 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.40

File:
1 edited

Legend:

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

    r9107 r9149  
    22#include <ippdb.h>
    33#include <stdlib.h>
     4#include <string.h>
    45
    56#define MAX_STRING_LENGTH 1024
     
    11851186
    11861187    {
     1188        detNormalizedExpRow *object;
     1189
     1190        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
     1191
     1192        if (!object) {
     1193            exit(EXIT_FAILURE);
     1194        }
     1195
     1196        if (!object->det_id == -32) {
     1197            psFree(object);
     1198            exit(EXIT_FAILURE);
     1199        }
     1200        if (!object->iteration == -32) {
     1201            psFree(object);
     1202            exit(EXIT_FAILURE);
     1203        }
     1204        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     1205            psFree(object);
     1206            exit(EXIT_FAILURE);
     1207        }
     1208        if (!object->bg == 64.64) {
     1209            psFree(object);
     1210            exit(EXIT_FAILURE);
     1211        }
     1212        if (!object->bg_stdev == 64.64) {
     1213            psFree(object);
     1214            exit(EXIT_FAILURE);
     1215        }
     1216        if (!object->bg_mean_stdev == 64.64) {
     1217            psFree(object);
     1218            exit(EXIT_FAILURE);
     1219        }
     1220        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
     1221            psFree(object);
     1222            exit(EXIT_FAILURE);
     1223        }
     1224        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
     1225            psFree(object);
     1226            exit(EXIT_FAILURE);
     1227        }
     1228
     1229        psFree(object);
     1230    }
     1231
     1232    {
    11871233        detMasterFrameRow *object;
    11881234
Note: See TracChangeset for help on using the changeset viewer.