Changeset 5114 for trunk/psLib/test/types
- Timestamp:
- Sep 23, 2005, 2:17:44 PM (21 years ago)
- Location:
- trunk/psLib/test/types
- Files:
-
- 3 edited
-
tst_psArray.c (modified) (4 diffs)
-
verified/tst_psArray.stderr (modified) (1 diff)
-
verified/tst_psPixels.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/types/tst_psArray.c
r4898 r5114 17 17 * @author Ross Harman, MHPCC 18 18 * 19 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $20 * @date $Date: 2005-0 8-30 01:14:13$19 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 20 * @date $Date: 2005-09-24 00:17:44 $ 21 21 * 22 22 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 52 52 static psS32 testArray01( void ); 53 53 static psS32 testArrayAdd( void ); 54 static psS32 testArrayGetSet( void ); 54 55 55 56 … … 58 59 {testArray01, -2, "psArray", 0, false}, 59 60 {testArrayAdd, 788, "psArrayAdd", 0, false}, 61 {testArrayGetSet, -3, "psArrayGetSet", 0, false}, 60 62 {NULL} 61 63 }; … … 440 442 return 0; // the value that indicates success is part of the testDescription 441 443 } 444 445 psS32 testArrayGetSet( void ) 446 { 447 psArray *test; 448 int *p1 = psAlloc(sizeof(int)); 449 int *p2 = psAlloc(sizeof(int)); 450 int *p3 = psAlloc(sizeof(int)); 451 test = psArrayAlloc(5); 452 test->n = 0; 453 *p1 = 10; 454 *p2 = 4; 455 *p3 = 666; 456 457 if ( !psArraySet(test, 0, p1) ) 458 fprintf(stderr, "ArraySet failed to set S32 at position 0\n"); 459 if ( psArraySet(test, 10, p1) ) 460 fprintf(stderr, "ArraySet Improperly set S32 at out of range position\n"); 461 if ( !psArraySet(test, 1, p2) ) 462 fprintf(stderr, "ArraySet Failed to set S32 at position 1\n"); 463 if ( psArrayGet(test, 0) != p1 ) 464 fprintf(stderr, "ArrayGet Failed to return the correct S32 from position 0\n"); 465 if ( psArrayGet(test, -1) != p2) 466 fprintf(stderr, "ArrayGet Failed to return the correct S32 from tail using -1\n"); 467 468 if ( psArraySet(test, -6, p3) ) 469 fprintf(stderr, "ArraySet failed to fail using an out of range negative number\n"); 470 471 psFree(test); 472 psFree(p3); 473 474 return 0; 475 } -
trunk/psLib/test/types/verified/tst_psArray.stderr
r4547 r5114 219 219 ---> TESTPOINT PASSED (psArray{psArrayAdd} | tst_psArray.c) 220 220 221 /***************************** TESTPOINT ******************************************\ 222 * TestFile: tst_psArray.c * 223 * TestPoint: psArray{psArrayGetSet} * 224 * TestType: Positive * 225 \**********************************************************************************/ 226 227 <DATE><TIME>|<HOST>|E|psArraySet (FILE:LINENO) 228 Specified position, 10, is greater than n+1 of the array, 1. 229 <DATE><TIME>|<HOST>|E|psArraySet (FILE:LINENO) 230 Invalid position. Negative number too large 231 232 ---> TESTPOINT PASSED (psArray{psArrayGetSet} | tst_psArray.c) 233 -
trunk/psLib/test/types/verified/tst_psPixels.stderr
r5101 r5114 79 79 \**********************************************************************************/ 80 80 81 <DATE><TIME>|<HOST>|E|psPixelsSet (FILE:LINENO) 82 Invalid position. Number too large 81 83 82 84 ---> TESTPOINT PASSED (psPixels{psPixelsGet/Set} | tst_psPixels.c)
Note:
See TracChangeset
for help on using the changeset viewer.
