Changeset 7115
- Timestamp:
- May 12, 2006, 10:56:48 PM (20 years ago)
- Location:
- trunk/psLib
- Files:
-
- 3 edited
-
src/sys/psString.c (modified) (2 diffs)
-
test/sys/tst_psString.c (modified) (3 diffs)
-
test/sys/verified/tst_psString.stderr (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.c
r7015 r7115 13 13 * @author David Robbins, MHPCC 14 14 * 15 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $16 * @date $Date: 2006-05- 01 00:57:07$15 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2006-05-13 08:56:48 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 230 230 231 231 psList *values = psListAlloc(NULL); // The list of values to return 232 PS_ASSERT_PTR_NON_NULL(string, values); 232 if (string == NULL) 233 return values; 234 // XXX this should not generate an error : it is a valid case 235 // PS_ASSERT_PTR_NON_NULL(string, values); 233 236 234 237 char *next = NULL; -
trunk/psLib/test/sys/tst_psString.c
r7045 r7115 20 20 * @author Eric Van Alst, MHPCC 21 21 * 22 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $23 * @date $Date: 2006-05- 02 23:55:53$22 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2006-05-13 08:56:48 $ 24 24 * 25 25 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 463 463 psFree(strList); 464 464 strList = NULL; 465 //Return NULLfor NULL string input466 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");465 //Return empty list for NULL string input 466 //psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 467 467 strList = psStringSplit(NULL, split, true); 468 468 // if (strList != NULL) { … … 684 684 return 4; 685 685 } 686 //psStringSplit should return NULLfor NULL input string686 //psStringSplit should return empty list for NULL input string 687 687 psList *nullList = NULL; 688 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");688 // psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 689 689 nullList = psStringSplit(nullTest, ",", true); 690 690 // if (nullList != NULL) { -
trunk/psLib/test/sys/verified/tst_psString.stderr
r7047 r7115 146 146 Following should generate error message 147 147 <DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO) 148 Unallowable operation: string is NULL.149 <DATE><TIME>|<HOST>|I|testStrSplit00150 Following should generate error message151 <DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO)152 148 Unallowable operation: splitters is NULL. 153 149 … … 179 175 Following should generate error message 180 176 <DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO) 181 Unallowable operation: string is NULL.182 <DATE><TIME>|<HOST>|I|testNULLStrings183 Following should generate error message184 <DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO)185 177 Unallowable operation: splitters is NULL. 186 178
Note:
See TracChangeset
for help on using the changeset viewer.
