Changeset 5214 for trunk/psLib/test/types
- Timestamp:
- Sep 30, 2005, 2:14:17 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/types/tst_psPixels.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/types/tst_psPixels.c
r5101 r5214 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 2$7 * @version $Revision: 1.3 $ 8 8 * $Name: not supported by cvs2svn $ 9 * @date $Date: 2005- 09-23 00:04:36$9 * @date $Date: 2005-10-01 00:14:17 $ 10 10 * 11 11 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 88 88 if (p1->n != p1->nalloc) { 89 89 psError(PS_ERR_UNKNOWN, true, 90 "psPixelsAlloc failed to set n = % d", p1->nalloc);90 "psPixelsAlloc failed to set n = %ld", p1->nalloc); 91 91 return 13; 92 92 } 93 93 if (p1->nalloc != 1) { 94 94 psError(PS_ERR_UNKNOWN, true, 95 "psPixelsAlloc failed to set nalloc = 1 (% d)",95 "psPixelsAlloc failed to set nalloc = 1 (%ld)", 96 96 p1->nalloc); 97 97 return 14; … … 117 117 if (p2->n != p2->nalloc) { 118 118 psError(PS_ERR_UNKNOWN, true, 119 "psPixelsAlloc failed to set n = % d", p2->nalloc);119 "psPixelsAlloc failed to set n = %ld", p2->nalloc); 120 120 return 13; 121 121 } 122 122 if (p2->nalloc != 10) { 123 123 psError(PS_ERR_UNKNOWN, true, 124 "psPixelsAlloc failed to set nalloc = 1 (% d)",124 "psPixelsAlloc failed to set nalloc = 1 (%ld)", 125 125 p2->nalloc); 126 126 return 14; … … 192 192 if (p0->data[i].x != i || p0->data[i].y != 100+i) { 193 193 psError(PS_ERR_UNKNOWN, true, 194 "The value of pixel %d was not preserved (% d,%d) vs (%d,%d).",194 "The value of pixel %d was not preserved (%f,%f) vs (%d,%d).", 195 195 i, p0->data[i].x, p0->data[i].y, i, 100+i); 196 196 return 15; … … 284 284 return 3; 285 285 } 286 for ( inti = 0; i < out1->n; i++) {286 for (long i = 0; i < out1->n; i++) { 287 287 if (out1->data[i].x != in1->data[i].x || out1->data[i].y != in1->data[i].y) { 288 288 psError(PS_ERR_UNKNOWN, true, 289 "failed to copy the values correctly at index % d", i);289 "failed to copy the values correctly at index %ld", i); 290 290 return 4; 291 291 } … … 402 402 if (pixels->n != numRows) { 403 403 psError(PS_ERR_UNKNOWN, false, 404 "wrong number of pixels in list. Got % d, should be %d.",404 "wrong number of pixels in list. Got %ld, should be %d.", 405 405 pixels->n, numRows); 406 406 return 2; 407 407 } 408 408 409 for ( inti = 0; i < pixels->n; i++) {410 if (mask->data.PS_TYPE_MASK_DATA[ pixels->data[i].y][pixels->data[i].x] != 1) {409 for (long i = 0; i < pixels->n; i++) { 410 if (mask->data.PS_TYPE_MASK_DATA[(int)pixels->data[i].y][(int)pixels->data[i].x] != 1) { 411 411 psError(PS_ERR_UNKNOWN, false, 412 "Item in psPixels list (% d,%d) didn't coorespond to a masked value in image",412 "Item in psPixels list (%f,%f) didn't coorespond to a masked value in image", 413 413 pixels->data[i].x, pixels->data[i].y); 414 414 return 3; … … 468 468 return 3; 469 469 } 470 for ( inti = 0; i < pixels2->n; i++) {470 for (long i = 0; i < pixels2->n; i++) { 471 471 if (pixels2->data[i].x != pixels->data[i].x || pixels2->data[i].y != pixels->data[i].y) { 472 472 psError(PS_ERR_UNKNOWN, true, 473 "failed to copy the values correctly at index % d", i);473 "failed to copy the values correctly at index %ld", i); 474 474 return 4; 475 475 } … … 486 486 if (pixels3->n != 15) { 487 487 psError(PS_ERR_UNKNOWN, true, 488 "pixels3->n != 15, == % d", pixels3->n);488 "pixels3->n != 15, == %ld", pixels3->n); 489 489 return 11; 490 490 } … … 526 526 out = psPixelsGet(in, 1); 527 527 if ( out.x != 3 || out.y != 13 ) { 528 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values % d,%d",528 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %f,%f", 529 529 out.x, out.y); 530 530 return 4; … … 538 538 out = psPixelsGet(in, 0); 539 539 if (out.x != 1 || out.y != 2) { 540 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values % d,%d",540 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psPixelsGet return incorrect values %f,%f", 541 541 out.x, out.y); 542 542 return 6;
Note:
See TracChangeset
for help on using the changeset viewer.
