IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8790


Ignore:
Timestamp:
Sep 11, 2006, 4:25:43 PM (20 years ago)
Author:
jhoblitt
Message:

fix tests 31-33 that broke when an unchecked in change to psError broke these tests. It turns out that that the test vector for these tests was not being initailized at all. It's something of a myster as to why these tests were working at all. The prevous test used the same values but psVectorInit() should have wiped these out...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/mathtypes/tap_psVector.c

    r8731 r8790  
    9696        psVector *psVec = psVectorAlloc(5, PS_TYPE_S32);
    9797        psVec->n = 5;
    98         psVec = psVectorRealloc(psVec,3);
     98
     99        // generate test data values
     100        for(psS32 i = 0; i < 5; i++) {
     101            psVec->data.S32[i] = i*10;
     102            psVec->n++;
     103        }
     104
     105        psVec = psVectorRealloc(psVec, 3);
    99106
    100107        ok(psVec != NULL, "test vector reallocated to smaller size");
     
    103110        ok(psVec->n == 3, "Vector population = %ld", psVec->n);
    104111
    105         // test data values
     112        // check that the test data values survived the realloc
    106113        for(psS32 i = 0; i < 3; i++) {
    107114            ok (psVec->data.S32[i] == i*10, "Elem %d = %d, expected %d", i, psVec->data.S32[i], i*10);
Note: See TracChangeset for help on using the changeset viewer.