Changeset 6211 for trunk/psLib/test/sys/tst_psString.c
- Timestamp:
- Jan 26, 2006, 1:31:22 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sys/tst_psString.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sys/tst_psString.c
r4547 r6211 20 20 * @author Eric Van Alst, MHPCC 21 21 * 22 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $23 * @date $Date: 200 5-07-13 02:47:01$22 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2006-01-26 23:31:22 $ 24 24 * 25 25 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 static psS32 testStrPrepend02(void); 51 51 static psS32 testStrPrepend03(void); 52 53 static psS32 testStrSplit00(void); 52 54 53 55 testDescription tests[] = { … … 69 71 {testStrPrepend02,13, "Verify prepend string creation", 0, false}, 70 72 {testStrPrepend03,14, "Test prepend null-op", 0, false}, 73 {testStrSplit00,15, "Test String Splitting", 0, false}, 71 74 {NULL} 72 75 }; … … 435 438 return 0; 436 439 } 440 441 static psS32 testStrSplit00(void) 442 { 443 psList *strList = NULL; 444 char str[30]; 445 char split[5]; 446 strncpy(str, "This is, a, test case, to check.", 30); 447 strncpy(split, ",", 2); 448 psString psStr; 449 psString psSplit; 450 psStr = psStringCopy(str); 451 psSplit = psStringCopy(split); 452 453 //Return NULL for NULL inputs 454 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 455 strList = psStringSplit(NULL, NULL); 456 if (strList != NULL) { 457 psFree(strList); 458 } 459 //Return NULL for NULL string input 460 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 461 strList = psStringSplit(NULL, split); 462 if (strList != NULL) { 463 psFree(strList); 464 } 465 //Return NULL for NULL splitter input 466 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 467 strList = psStringSplit(str, NULL); 468 if (strList != NULL) { 469 psFree(strList); 470 } 471 472 473 /* 474 strList = psStringSplit(str, split); 475 476 strList = psStringSplit(psStr, split); 477 478 strList = psStringSplit(str, psSplit); 479 480 strList = psStringSplit(psStr, psSplit); 481 */ 482 // psFree(strList); 483 return 0; 484 } 485
Note:
See TracChangeset
for help on using the changeset viewer.
