Changeset 8790
- Timestamp:
- Sep 11, 2006, 4:25:43 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/mathtypes/tap_psVector.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/mathtypes/tap_psVector.c
r8731 r8790 96 96 psVector *psVec = psVectorAlloc(5, PS_TYPE_S32); 97 97 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); 99 106 100 107 ok(psVec != NULL, "test vector reallocated to smaller size"); … … 103 110 ok(psVec->n == 3, "Vector population = %ld", psVec->n); 104 111 105 // test data values112 // check that the test data values survived the realloc 106 113 for(psS32 i = 0; i < 3; i++) { 107 114 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.
