Changeset 5087 for trunk/psLib/test/mathtypes
- Timestamp:
- Sep 21, 2005, 11:37:21 AM (21 years ago)
- Location:
- trunk/psLib/test/mathtypes
- Files:
-
- 2 edited
-
tst_psVector.c (modified) (4 diffs)
-
verified/tst_psVector.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/mathtypes/tst_psVector.c
r4887 r5087 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-0 8-26 23:01:17$16 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-09-21 21:37:21 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 static psS32 testVectorExtend(void); 29 29 static psS32 testVectorInit(void); 30 static psS32 testVectorCreate(void); 30 31 31 32 testDescription tests[] = { … … 34 35 {testVectorExtend,-3,"psVectorExtend",0,false}, 35 36 {testVectorInit,-4,"psVectorInit",0,false}, 37 {testVectorCreate,-5,"psVectorCreate",0,false}, 36 38 {NULL} 37 39 }; … … 357 359 return 0; 358 360 } 361 362 psS32 testVectorCreate(void) 363 { 364 psVector *test = NULL; 365 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); 369 370 for (int i = 0; i < 10; i++) { 371 if (test->data.S32[i] != i) { 372 fprintf(stderr, "Vector data does not match. i = %d, data=%d\n", i, test->data.S32[i]); 373 return 1; 374 } 375 if (test2->data.F32[i] != i*0.5) { 376 fprintf(stderr, "Vector data does not match. i = %d, data=%f\n", i, test->data.F32[i]); 377 return 1; 378 } 379 } 380 psFree(test); 381 psFree(test2); 382 return 0; 383 } 384 -
trunk/psLib/test/mathtypes/verified/tst_psVector.stderr
r4887 r5087 49 49 ---> TESTPOINT PASSED (psVector{psVectorInit} | tst_psVector.c) 50 50 51 /***************************** TESTPOINT ******************************************\ 52 * TestFile: tst_psVector.c * 53 * TestPoint: psVector{psVectorCreate} * 54 * TestType: Positive * 55 \**********************************************************************************/ 56 57 58 ---> TESTPOINT PASSED (psVector{psVectorCreate} | tst_psVector.c) 59
Note:
See TracChangeset
for help on using the changeset viewer.
