Changeset 2204 for trunk/psLib/test/collections/tst_psVector.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psVector.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psVector.c
r1920 r2204 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $17 * @date $Date: 2004- 09-28 23:26:49$16 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2004-10-27 00:57:33 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 24 24 #include "psTest.h" 25 25 26 int main(intargc,27 char* argv[])26 psS32 main(psS32 argc, 27 char* argv[]) 28 28 { 29 29 … … 40 40 // Test B - Add data to integer vector 41 41 printPositiveTestHeader(stdout, "psVector", "Add data to S32 vector"); 42 for( inti = 0; i < 5; i++) {42 for(psS32 i = 0; i < 5; i++) { 43 43 psVec->data.S32[i] = i*10; 44 44 printf("Elem %d = %d\n", i, psVec->data.S32[i]); … … 53 53 psVec = psVectorRealloc(psVec,10); 54 54 printf("Adding more elements to S32 vector...\n"); 55 for( inti = 5; i < 10; i++) {55 for(psS32 i = 5; i < 10; i++) { 56 56 psVec->data.S32[i] = i*10; 57 57 psVec->n++; … … 67 67 psVec = psVectorRealloc(psVec,3); 68 68 printf("Vector size = %d\n", psVec->nalloc); 69 for( inti = 0; i < 3; i++) {69 for(psS32 i = 0; i < 3; i++) { 70 70 printf("Elem %d = %d\n", i, psVec->data.S32[i]); 71 71 } … … 78 78 printPositiveTestHeader(stdout, "psVector", "Free S32 vector"); 79 79 psFree(psVec); 80 intleaks = psMemCheckLeaks(0, NULL, stdout);80 psS32 leaks = psMemCheckLeaks(0, NULL, stdout); 81 81 if(leaks != 0) { 82 82 printf("ERROR: Found %d memory leaks\n",leaks); 83 83 } 84 intnBad = psMemCheckCorruption(0);84 psS32 nBad = psMemCheckCorruption(0); 85 85 if(nBad) { 86 86 printf("ERROR: Found %d bad memory blocks\n", nBad);
Note:
See TracChangeset
for help on using the changeset viewer.
