Changeset 6989 for trunk/psLib/test/sys/tst_psString.c
- Timestamp:
- Apr 25, 2006, 4:19:23 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sys/tst_psString.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sys/tst_psString.c
r6278 r6989 20 20 * @author Eric Van Alst, MHPCC 21 21 * 22 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $23 * @date $Date: 2006-0 2-01 20:40:56$22 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2006-04-26 02:19:23 $ 24 24 * 25 25 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 456 456 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 457 457 strList = psStringSplit(NULL, NULL); 458 if (strList != NULL) { 458 // if (strList != NULL) { 459 if ( psListLength(strList) ) { 459 460 psFree(strList); 460 461 return 1; 461 462 } 463 psFree(strList); 464 strList = NULL; 462 465 //Return NULL for NULL string input 463 466 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 464 467 strList = psStringSplit(NULL, split); 465 if (strList != NULL) { 468 // if (strList != NULL) { 469 if ( psListLength(strList) ) { 466 470 psFree(strList); 467 471 return 2; 468 472 } 473 psFree(strList); 474 strList = NULL; 469 475 //Return NULL for NULL splitter input 470 476 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 471 477 strList = psStringSplit(str, NULL); 472 if (strList != NULL) { 478 // if (strList != NULL) { 479 if ( psListLength(strList) ) { 473 480 psFree(strList); 474 481 return 3; 475 482 } 483 psFree(strList); 484 strList = NULL; 476 485 //Return a psList* of psStrings 477 486 strList = psStringSplit(str, split); … … 679 688 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 680 689 nullList = psStringSplit(nullTest, ","); 681 if (nullList != NULL) { 690 // if (nullList != NULL) { 691 if ( psListLength(nullList) ) { 682 692 psError(PS_ERR_BAD_PARAMETER_NULL, false, 683 693 "psStringSplit failed to return NULL for NULL input string.\n"); 684 694 return 5; 685 695 } 696 psFree(nullList); 697 nullList = NULL; 686 698 //psStringSplit should return NULL for NULL input splitter 687 699 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 688 700 nullList = psStringSplit("Hello World", nullTest); 689 if (nullList != NULL) { 701 // if (nullList != NULL) { 702 if ( psListLength(nullList) ) { 690 703 psError(PS_ERR_BAD_PARAMETER_NULL, false, 691 704 "psStringSplit failed to return NULL for NULL input splitter.\n"); 692 705 return 6; 693 706 } 694 695 return 0; 696 } 697 707 psFree(nullList); 708 709 return 0; 710 } 711
Note:
See TracChangeset
for help on using the changeset viewer.
