Changeset 5101 for trunk/psLib/test/types
- Timestamp:
- Sep 22, 2005, 2:04:36 PM (21 years ago)
- Location:
- trunk/psLib/test/types
- Files:
-
- 2 edited
-
tst_psPixels.c (modified) (4 diffs)
-
verified/tst_psPixels.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/types/tst_psPixels.c
r4547 r5101 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 1$7 * @version $Revision: 1.2 $ 8 8 * $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-0 7-13 02:47:01$9 * @date $Date: 2005-09-23 00:04:36 $ 10 10 * 11 11 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 static int testPixelsFromMask(void); 22 22 static int testPixelsConcatenate(void); 23 static psS32 testPixelsGetSet(void); 23 24 24 25 testDescription tests[] = { … … 29 30 {testPixelsFromMask,865,"psPixelsFromMask",0,false}, 30 31 {testPixelsConcatenate,866,"psPixelsConcatenate",0,false}, 32 {testPixelsGetSet,867,"psPixelsGet/Set",0,false}, 31 33 {NULL} 32 34 }; … … 502 504 } 503 505 506 psS32 testPixelsGetSet(void) 507 { 508 psPixels *in = psPixelsAlloc(5); 509 in->n = 0; 510 psPixelCoord value; 511 psPixelCoord out; 512 value.x = 3; 513 value.y = 13; 514 if ( psPixelsSet(in, 2, value) ) { 515 psError(PS_ERR_LOCATION_INVALID, true, "psPixelSet set to Invalid location\n"); 516 return 1; 517 } 518 if ( !psPixelsSet(in, 0, value) ) { 519 psError(PS_ERR_UNKNOWN, true, "psPixelsSet failed to set pixels at location 0\n"); 520 return 2; 521 } 522 if ( !psPixelsSet(in, 1, value) ) { 523 psError(PS_ERR_UNKNOWN, true, "psPixelsSet failed to set pixels at location 0\n"); 524 return 3; 525 } 526 out = psPixelsGet(in, 1); 527 if ( out.x != 3 || out.y != 13 ) { 528 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %d,%d", 529 out.x, out.y); 530 return 4; 531 } 532 value.x = 1; 533 value.y = 2; 534 if ( !psPixelsSet(in, 0, value) ) { 535 psError(PS_ERR_UNKNOWN, true, "psPixelsSet failed to set pixels at location 0\n"); 536 return 5; 537 } 538 out = psPixelsGet(in, 0); 539 if (out.x != 1 || out.y != 2) { 540 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %d,%d", 541 out.x, out.y); 542 return 6; 543 } 544 psFree(in); 545 return 0; 546 } 547 -
trunk/psLib/test/types/verified/tst_psPixels.stderr
r4547 r5101 73 73 ---> TESTPOINT PASSED (psPixels{psPixelsConcatenate} | tst_psPixels.c) 74 74 75 /***************************** TESTPOINT ******************************************\ 76 * TestFile: tst_psPixels.c * 77 * TestPoint: psPixels{psPixelsGet/Set} * 78 * TestType: Positive * 79 \**********************************************************************************/ 80 81 82 ---> TESTPOINT PASSED (psPixels{psPixelsGet/Set} | tst_psPixels.c) 83
Note:
See TracChangeset
for help on using the changeset viewer.
