IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11136 for trunk/ippdb/tests


Ignore:
Timestamp:
Jan 18, 2007, 2:14:55 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.76

Location:
trunk/ippdb/tests
Files:
5 edited

Legend:

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

    r11113 r11136  
    244244        newExpRow       *object;
    245245
    246         object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32    );
     246        object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string"    );
    247247
    248248        if (!object) {
     
    277277            exit(EXIT_FAILURE);
    278278        }
     279        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     280            psFree(object);
     281            exit(EXIT_FAILURE);
     282        }
    279283
    280284        psFree(object);
     
    313317        rawExpRow       *object;
    314318
    315         object = rawExpRowAlloc("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", -16    );
    316 
    317         if (!object) {
    318             exit(EXIT_FAILURE);
    319         }
    320 
    321         if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
     319        object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "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", -16    );
     320
     321        if (!object) {
     322            exit(EXIT_FAILURE);
     323        }
     324
     325        if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) {
     326            psFree(object);
     327            exit(EXIT_FAILURE);
     328        }
     329        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
    322330            psFree(object);
    323331            exit(EXIT_FAILURE);
     
    331339            exit(EXIT_FAILURE);
    332340        }
     341            psFree(object);
     342            exit(EXIT_FAILURE);
     343        }
    333344        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
    334345            psFree(object);
     
    339350            exit(EXIT_FAILURE);
    340351        }
     352        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     353            psFree(object);
     354            exit(EXIT_FAILURE);
     355        }
    341356        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
    342357            psFree(object);
     
    394409            exit(EXIT_FAILURE);
    395410        }
    396             psFree(object);
    397             exit(EXIT_FAILURE);
    398         }
    399411
    400412        psFree(object);
     
    822834        detRunRow       *object;
    823835
    824         object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z"    );
     836        object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z"    );
    825837
    826838        if (!object) {
     
    852864            exit(EXIT_FAILURE);
    853865        }
     866        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     867            psFree(object);
     868            exit(EXIT_FAILURE);
     869        }
    854870        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
    855871            psFree(object);
     
    13611377        p4RunRow        *object;
    13621378
    1363         object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string"    );
     1379        object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string"    );
    13641380
    13651381        if (!object) {
     
    13761392        }
    13771393        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
     1394            psFree(object);
     1395            exit(EXIT_FAILURE);
     1396        }
     1397        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
    13781398            psFree(object);
    13791399            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/insert.c

    r11113 r11136  
    118118        }
    119119
    120         if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32)) {
     120        if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string")) {
    121121            exit(EXIT_FAILURE);
    122122        }
     
    148148        }
    149149
    150         if (!rawExpInsert(dbh, "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", -16)) {
     150        if (!rawExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "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", -16)) {
    151151            exit(EXIT_FAILURE);
    152152        }
     
    313313        }
    314314
    315         if (!detRunInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z")) {
     315        if (!detRunInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z")) {
    316316            exit(EXIT_FAILURE);
    317317        }
     
    478478        }
    479479
    480         if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string")) {
     480        if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string")) {
    481481            exit(EXIT_FAILURE);
    482482        }
  • trunk/ippdb/tests/insertobject.c

    r11113 r11136  
    168168        }
    169169
    170         object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32);
     170        object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string");
    171171        if (!object) {
    172172            exit(EXIT_FAILURE);
     
    212212        }
    213213
    214         object = rawExpRowAlloc("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", -16);
     214        object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "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", -16);
    215215        if (!object) {
    216216            exit(EXIT_FAILURE);
     
    454454        }
    455455
    456         object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");
     456        object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");
    457457        if (!object) {
    458458            exit(EXIT_FAILURE);
     
    696696        }
    697697
    698         object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");
     698        object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");
    699699        if (!object) {
    700700            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/metadatafromobject.c

    r11113 r11136  
    302302        bool            status;
    303303
    304         object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32);
     304        object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string");
    305305        if (!object) {
    306306            exit(EXIT_FAILURE);
     
    341341            exit(EXIT_FAILURE);
    342342        }
     343        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
     344            psFree(md);
     345            exit(EXIT_FAILURE);
     346        }
    343347
    344348        psFree(md);
     
    387391        bool            status;
    388392
    389         object = rawExpRowAlloc("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", -16);
     393        object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "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", -16);
    390394        if (!object) {
    391395            exit(EXIT_FAILURE);
     
    403407            exit(EXIT_FAILURE);
    404408        }
     409        if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) {
     410            psFree(md);
     411            exit(EXIT_FAILURE);
     412        }
    405413        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
    406414            psFree(md);
     
    411419            exit(EXIT_FAILURE);
    412420        }
     421            psFree(md);
     422            exit(EXIT_FAILURE);
     423        }
    413424        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
    414425            psFree(md);
     
    419430            exit(EXIT_FAILURE);
    420431        }
     432        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
     433            psFree(md);
     434            exit(EXIT_FAILURE);
     435        }
    421436        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    422437            psFree(md);
     
    474489            exit(EXIT_FAILURE);
    475490        }
    476             psFree(md);
    477             exit(EXIT_FAILURE);
    478         }
    479491
    480492        psFree(md);
     
    984996        bool            status;
    985997
    986         object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");
     998        object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");
    987999        if (!object) {
    9881000            exit(EXIT_FAILURE);
     
    10201032            exit(EXIT_FAILURE);
    10211033        }
     1034        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
     1035            psFree(md);
     1036            exit(EXIT_FAILURE);
     1037        }
    10221038        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
    10231039            psFree(md);
     
    16111627        bool            status;
    16121628
    1613         object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");
     1629        object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");
    16141630        if (!object) {
    16151631            exit(EXIT_FAILURE);
     
    16321648        }
    16331649        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
     1650            psFree(md);
     1651            exit(EXIT_FAILURE);
     1652        }
     1653        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
    16341654            psFree(md);
    16351655            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/objectfrommetadata.c

    r11113 r11136  
    450450            exit(EXIT_FAILURE);
    451451        }
     452        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     453            psFree(md);
     454            exit(EXIT_FAILURE);
     455        }
    452456
    453457        object = newExpObjectFromMetadata(md);
     
    486490            exit(EXIT_FAILURE);
    487491        }
     492        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     493            psFree(object);
     494            exit(EXIT_FAILURE);
     495        }
    488496
    489497        psFree(object);
     
    549557            exit(EXIT_FAILURE);
    550558        }
     559        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) {
     560            psFree(md);
     561            exit(EXIT_FAILURE);
     562        }
    551563        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
    552564            psFree(md);
     
    557569            exit(EXIT_FAILURE);
    558570        }
     571            psFree(md);
     572            exit(EXIT_FAILURE);
     573        }
    559574        if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) {
    560575            psFree(md);
     
    565580            exit(EXIT_FAILURE);
    566581        }
     582        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     583            psFree(md);
     584            exit(EXIT_FAILURE);
     585        }
    567586        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
    568587            psFree(md);
     
    620639            exit(EXIT_FAILURE);
    621640        }
    622             psFree(md);
    623             exit(EXIT_FAILURE);
    624         }
    625641
    626642        object = rawExpObjectFromMetadata(md);
     
    636652            exit(EXIT_FAILURE);
    637653        }
     654        if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) {
     655            psFree(object);
     656            exit(EXIT_FAILURE);
     657        }
    638658        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
    639659            psFree(object);
     
    644664            exit(EXIT_FAILURE);
    645665        }
     666            psFree(object);
     667            exit(EXIT_FAILURE);
     668        }
    646669        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
    647670            psFree(object);
     
    652675            exit(EXIT_FAILURE);
    653676        }
     677        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     678            psFree(object);
     679            exit(EXIT_FAILURE);
     680        }
    654681        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
    655682            psFree(object);
     
    707734            exit(EXIT_FAILURE);
    708735        }
    709             psFree(object);
    710             exit(EXIT_FAILURE);
    711         }
    712736
    713737        psFree(object);
     
    14991523            exit(EXIT_FAILURE);
    15001524        }
     1525        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     1526            psFree(md);
     1527            exit(EXIT_FAILURE);
     1528        }
    15011529        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
    15021530            psFree(md);
     
    15651593            exit(EXIT_FAILURE);
    15661594        }
     1595        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     1596            psFree(object);
     1597            exit(EXIT_FAILURE);
     1598        }
    15671599        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
    15681600            psFree(object);
     
    24772509            exit(EXIT_FAILURE);
    24782510        }
     2511        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     2512            psFree(md);
     2513            exit(EXIT_FAILURE);
     2514        }
    24792515        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
    24802516            psFree(md);
     
    25232559        }
    25242560        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
     2561            psFree(object);
     2562            exit(EXIT_FAILURE);
     2563        }
     2564        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
    25252565            psFree(object);
    25262566            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.