Changeset 2879 for trunk/psLib/test/image/tst_psImage.c
- Timestamp:
- Jan 3, 2005, 4:34:58 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/image/tst_psImage.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImage.c
r2273 r2879 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $9 * @date $Date: 200 4-11-04 01:05:00$8 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-01-04 02:34:58 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 static psS32 testImageAlloc(void); 24 24 static psS32 testImageCopy(void); 25 static psS32 testRegion(void); 25 26 26 27 testDescription tests[] = { … … 28 29 {testImageAlloc,548,"psImageFree",0,true}, 29 30 {testImageCopy,551,"psImageCopy",0,false}, 31 {testRegion,790,"psRegionAlloc",0,false}, 32 {testRegion,791,"psRegionFromString",0,true}, 30 33 {NULL} 31 34 }; … … 394 397 } 395 398 399 static psS32 testRegion(void) 400 { 401 int testNum = 0; 402 403 404 // Testpoint #790 405 406 psRegion* region = psRegionAlloc(1,2,3,4); 407 408 testNum++; 409 if (region == NULL) { 410 psError(PS_ERR_UNKNOWN, false, 411 "psRegionAlloc returned a NULL pointer."); 412 return testNum; 413 } 414 415 testNum++; 416 if (region->x0 != 1 || region->x1 != 2 || region->y0 != 3 || region->y1 != 4) { 417 psError(PS_ERR_UNKNOWN, false, 418 "The region attributes are not set properly (%s)", 419 psRegionToString(region)); 420 return testNum; 421 } 422 423 psFree(region); 424 425 // Testpoint #791 426 427 region = psRegionFromString("[1:2,3:4]"); 428 429 testNum++; 430 if (region == NULL) { 431 psError(PS_ERR_UNKNOWN, false, 432 "psRegionFromString returned a NULL pointer."); 433 return testNum; 434 } 435 436 testNum++; 437 if (region->x0 != 1 || region->x1 != 2 || region->y0 != 3 || region->y1 != 4) { 438 psError(PS_ERR_UNKNOWN, false, 439 "The region attributes are not set properly (%s)", 440 psRegionToString(region)); 441 return testNum; 442 } 443 444 psFree(region); 445 region = psRegionFromString("[1:2,3:]"); 446 447 testNum++; 448 if (region != NULL) { 449 psError(PS_ERR_UNKNOWN, false, 450 "psRegionFromString returned a non-NULL pointer given a malformed string."); 451 return testNum; 452 } 453 454 return 0; 455 }
Note:
See TracChangeset
for help on using the changeset viewer.
