Changeset 12512
- Timestamp:
- Mar 19, 2007, 5:31:39 PM (19 years ago)
- Location:
- trunk/psLib/test
- Files:
-
- 3 edited
-
sys/tap_psString.c (modified) (6 diffs)
-
sys/tap_psTrace.c (modified) (7 diffs)
-
types/tap_psPixels_all.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sys/tap_psString.c
r12208 r12512 20 20 * @author Eric Van Alst, MHPCC 21 21 * 22 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $23 * @date $Date: 2007-03- 03 02:43:37$22 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2007-03-20 03:31:39 $ 24 24 * 25 25 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 56 56 psS32 testNULLStrings(void); 57 57 psS32 testStrCheck(void); 58 59 static const char* const NullString = "";60 58 61 59 … … 311 309 diag("testStrAppend03"); 312 310 313 char *str=NULL; 314 int result; 315 316 str = psStringCopy(STR_0); 311 char *str =psStringCopy(STR_0); 317 312 318 313 // test null-op 319 psStringAppend(&str, NullString); 320 result = strcmp(str, STR_0); 321 ok ( result == 0, "Failed test point str=[%s]\n", str); 314 psStringAppend(&str, "%s", ""); 315 ok_str(str, STR_0, "Failed test point"); 322 316 psFree(str); 323 317 … … 391 385 392 386 // test null-op 393 psStringPrepend(&str, NullString);387 psStringPrepend(&str, "%s", ""); 394 388 result = strcmp(str, STR_0); 395 389 ok ( result == 0, "test point str=[%s]\n", str); … … 531 525 psS32 testNULLStrings(void) 532 526 { 533 diag("test NULLStrings");527 diag("test""s"); 534 528 535 529 psString nullTest = NULL; … … 550 544 551 545 //psStringAppend should return 0 for NULL input destination 552 outSize = psStringAppend(nullDest, NullString);546 outSize = psStringAppend(nullDest, "%s", ""); 553 547 ok (outSize == 0, 554 548 "psStringAppend to return 0 for NULL input destination.\n"); -
trunk/psLib/test/sys/tap_psTrace.c
r10810 r12512 49 49 50 50 // psTraceSetDestination(stderr); 51 psTraceSetDestination(2);51 (void)psTraceSetDestination(2); 52 52 53 53 for (i=0;i<10;i++) { … … 89 89 90 90 // psTraceSetDestination(stderr); 91 psTraceSetDestination(2);91 (void)psTraceSetDestination(2); 92 92 (void)psTraceSetLevel(".A.B.C.D.E", 5); 93 93 … … 107 107 psTraceReset(); 108 108 // psTraceSetDestination(stderr); 109 psTraceSetDestination(2);110 psTraceSetLevel(".A.B", 2);111 psTraceSetLevel(".A.B.C.D.E", 5);112 psTracePrintLevels(); 113 psTraceSetLevel(".A.B", 10);109 (void)psTraceSetDestination(2); 110 (void)psTraceSetLevel(".A.B", 2); 111 (void)psTraceSetLevel(".A.B.C.D.E", 5); 112 psTracePrintLevels(); 113 (void)psTraceSetLevel(".A.B", 10); 114 114 psTracePrintLevels(); 115 115 … … 137 137 138 138 // psTraceSetDestination(stderr); 139 psTraceSetDestination(2);139 (void)psTraceSetDestination(2); 140 140 141 141 for (i=0;i<10;i++) { … … 182 182 if (nb == 0) 183 183 // psTraceSetDestination(stdout); 184 psTraceSetDestination(1);184 (void)psTraceSetDestination(1); 185 185 if (nb == 1) 186 186 // psTraceSetDestination(stderr); 187 psTraceSetDestination(2);187 (void)psTraceSetDestination(2); 188 188 if (nb == 2) 189 psTraceSetDestination(0); //NULL189 (void)psTraceSetDestination(0); //NULL 190 190 if (nb == 3) 191 psTraceSetDestination(FD);191 (void)psTraceSetDestination(FD); 192 192 193 193 (void)psTraceSetLevel(".", 4); … … 226 226 { 227 227 // psTraceSetDestination(stderr); 228 psTraceSetDestination(2);228 (void)psTraceSetDestination(2); 229 229 230 230 (void)psTraceSetLevel(".", 9); … … 277 277 { 278 278 // psTraceSetDestination(stderr); 279 psTraceSetDestination(2);279 (void)psTraceSetDestination(2); 280 280 281 281 (void)psTraceSetLevel(".", 9); -
trunk/psLib/test/types/tap_psPixels_all.c
r12331 r12512 273 273 } 274 274 275 psPixels *outPixels = NULL;276 {275 { 276 psPixels *outPixels = NULL; 277 277 outPixels = psPixelsFromMask(outPixels, outImage, maskVal); 278 278 ok ( outPixels != NULL, … … 281 281 } 282 282 283 //Return NULL for NULL image input 284 { 285 psPixels *outPixels = psPixelsFromMask(outPixels, NULL, maskVal); 283 // Return NULL for NULL image input 284 { 285 psPixels *outPixels = NULL; 286 outPixels = psPixelsFromMask(outPixels, NULL, maskVal); 286 287 ok ( outPixels == NULL, 287 288 "psPixelsFromMask: return NULL for NULL image input."); 288 289 } 289 //Return NULL for image with wrong maskType 290 291 // Return NULL for image with wrong maskType 290 292 *(psElemType*)&(outImage->type.type) = PS_TYPE_U32; 291 293 { 292 psPixels *outPixels = psPixelsFromMask(outPixels, outImage, maskVal); 294 psPixels *outPixels = NULL; 295 outPixels = psPixelsFromMask(outPixels, outImage, maskVal); 293 296 ok ( outPixels == NULL, 294 297 "psPixelsFromMask: return NULL for image with wrong maskType."); 295 298 } 296 299 297 //psPixelsConcatenate Tests 298 //Return NULL for NULL pixels input 299 { 300 psPixels *outPixels = psPixelsConcatenate(outPixels, NULL); 300 // psPixelsConcatenate Tests 301 // Return NULL for NULL pixels input 302 { 303 psPixels *outPixels = NULL; 304 outPixels = psPixelsConcatenate(outPixels, NULL); 301 305 ok ( outPixels == NULL, 302 306 "psPixelsConcatenate: return NULL for NULL pixels input."); … … 306 310 //Return copy of input pixels for NULL out pixels 307 311 { 312 psPixels *outPixels = NULL; 308 313 outPixels = psPixelsFromMask(outPixels, outImage, maskVal); 309 314 outPixels = psPixelsConcatenate(outPixels, p0); … … 313 318 psFree(outPixels); 314 319 } 320 315 321 //Return properly concatenated psPixels list 316 322 //Set all the compare cases to cover 'comparePixelCoord' as well. 317 outPixels = psPixelsAlloc(5);323 psPixels *outPixels = psPixelsAlloc(5); 318 324 in.x = 1.0; 319 325 in.y = 1.0;
Note:
See TracChangeset
for help on using the changeset viewer.
