Changeset 5089 for trunk/psLib/test/mathtypes
- Timestamp:
- Sep 21, 2005, 4:32:00 PM (21 years ago)
- Location:
- trunk/psLib/test/mathtypes
- Files:
-
- 2 edited
-
tst_psVector.c (modified) (5 diffs)
-
verified/tst_psVector.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/mathtypes/tst_psVector.c
r5087 r5089 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-09-2 1 21:37:21$16 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-09-22 02:32:00 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 29 29 static psS32 testVectorInit(void); 30 30 static psS32 testVectorCreate(void); 31 static psS32 testVectorGetSet(void); 31 32 32 33 testDescription tests[] = { … … 36 37 {testVectorInit,-4,"psVectorInit",0,false}, 37 38 {testVectorCreate,-5,"psVectorCreate",0,false}, 39 {testVectorGetSet,-6,"psVectorGet/Set",0,false}, 38 40 {NULL} 39 41 }; … … 364 366 psVector *test = NULL; 365 367 psVector *test2 = NULL; 366 367 test = psVectorCreate(0.0, 10.0, 1.0, PS_TYPE_S32); 368 test2 = psVectorCreate(0.0, 5.0, 0.5, PS_TYPE_F32); 368 psVector *input = NULL; 369 psVector *input2 = psVectorAlloc(5, PS_TYPE_F64); 370 371 test = psVectorCreate(input, 0.0, 10.0, 1.0, PS_TYPE_S32); 372 test2 = psVectorCreate(input2, 0.0, 5.0, 0.5, PS_TYPE_F32); 369 373 370 374 for (int i = 0; i < 10; i++) { … … 383 387 } 384 388 389 psS32 testVectorGetSet(void) 390 { 391 psVector *vec = NULL; 392 vec = psVectorAlloc(5, PS_TYPE_S32); 393 394 if ( !psVectorSet(vec, 0, 10) ) 395 fprintf(stderr, "VectorSet failed to set S32 at position 0\n"); 396 if ( psVectorSet(vec, 10, 10) ) 397 fprintf(stderr, "VectorSet Improperly set S32 at out of range position\n"); 398 if ( !psVectorSet(vec, -1, 4) ) 399 fprintf(stderr, "VectorSet Failed to set S32 at position 4\n"); 400 if ( (psS32)psVectorGet(vec, 0) != 10 ) 401 fprintf(stderr, "VectorGet Failed to return the correct S32 from position 0\n"); 402 if ( (psS32)psVectorGet(vec, -1) != 4 ) 403 fprintf(stderr, "VectorGet Failed to return the correct S32 from tail using -1\n"); 404 405 psFree(vec); 406 return 0; 407 } 408 409 410 -
trunk/psLib/test/mathtypes/verified/tst_psVector.stderr
r5087 r5089 58 58 ---> TESTPOINT PASSED (psVector{psVectorCreate} | tst_psVector.c) 59 59 60 /***************************** TESTPOINT ******************************************\ 61 * TestFile: tst_psVector.c * 62 * TestPoint: psVector{psVectorGet/Set} * 63 * TestType: Positive * 64 \**********************************************************************************/ 65 66 67 ---> TESTPOINT PASSED (psVector{psVectorGet/Set} | tst_psVector.c) 68
Note:
See TracChangeset
for help on using the changeset viewer.
