Changeset 2699
- Timestamp:
- Dec 10, 2004, 3:24:15 PM (22 years ago)
- Location:
- trunk/psLib
- Files:
-
- 4 edited
-
src/collections/psList.c (modified) (2 diffs)
-
src/types/psList.c (modified) (2 diffs)
-
test/collections/tst_psList.c (modified) (1 diff)
-
test/collections/verified/tst_psList.stderr (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psList.c
r2698 r2699 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12-11 01: 19:06$8 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-11 01:24:14 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 257 257 } 258 258 259 if (location > = (int)list->size) {259 if (location > 0 && location >= (int)list->size) { 260 260 psLogMsg(__func__,PS_LOG_WARN, 261 261 "Specified location, %d, is beyond the end of the list. " -
trunk/psLib/src/types/psList.c
r2698 r2699 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12-11 01: 19:06$8 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-11 01:24:14 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 257 257 } 258 258 259 if (location > = (int)list->size) {259 if (location > 0 && location >= (int)list->size) { 260 260 psLogMsg(__func__,PS_LOG_WARN, 261 261 "Specified location, %d, is beyond the end of the list. " -
trunk/psLib/test/collections/tst_psList.c
r2698 r2699 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12-11 01: 19:06$8 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-11 01:24:15 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii -
trunk/psLib/test/collections/verified/tst_psList.stderr
r2281 r2699 18 18 <DATE><TIME>|<HOST>|I|testListAdd 19 19 psListAdd shall add an element to list 20 <DATE><TIME>|<HOST>|E|psListAdd (psList.c:<LINENO>) 21 Specified psList reference is NULL. 22 <DATE><TIME>|<HOST>|E|psListAdd (psList.c:<LINENO>) 23 Specified data item is NULL. 20 24 <DATE><TIME>|<HOST>|I|testListAdd 21 25 Following should error with invalid insert location 22 <DATE><TIME>|<HOST>| W|psListAdd23 The given insert location (-10) for psListAddis invalid.26 <DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>) 27 Specified location, -10, is invalid. 24 28 <DATE><TIME>|<HOST>|I|testListAdd 25 29 Following should be a warning. 26 30 <DATE><TIME>|<HOST>|W|psListAdd 27 Invalid index 9 (only 6 elements in psList); assumingtail.31 Specified location, 9, is beyond the end of the list. Adding data item to tail. 28 32 29 33 ---> TESTPOINT PASSED (psList{psListAdd} | tst_psList.c) … … 37 41 <DATE><TIME>|<HOST>|I|testListGet 38 42 Following should be an error 39 <DATE><TIME>|<HOST>|E|listSetIterator (psList.c:<LINENO>) 40 Unexpected null pointer for psList parameter. 43 <DATE><TIME>|<HOST>|E|psListGet (psList.c:<LINENO>) 44 Specified psList reference is NULL. 45 <DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>) 46 Specified location, 5, is invalid. 47 <DATE><TIME>|<HOST>|E|psListGet (psList.c:<LINENO>) 48 Specified location, 5, is invalid. 49 <DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>) 50 Specified location, 4, is invalid. 51 <DATE><TIME>|<HOST>|E|psListGet (psList.c:<LINENO>) 52 Specified location, 4, is invalid. 41 53 42 54 ---> TESTPOINT PASSED (psList{psListGet} | tst_psList.c) … … 51 63 Following should be an error 52 64 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>) 53 list parameter found to be NULL.65 Specified psList reference is NULL. 54 66 <DATE><TIME>|<HOST>|I|testListRemove 55 67 Next message should be an error 56 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>)57 Couldn't position to given index (-4) to remove element from list.68 <DATE><TIME>|<HOST>|E|psListRemoveData (psList.c:<LINENO>) 69 Specified data item is NULL. 58 70 <DATE><TIME>|<HOST>|I|testListRemove 59 71 Next message should be an error 60 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>) 61 Couldn't position to given index (-2) to remove element from list. 62 <DATE><TIME>|<HOST>|I|testListRemove 63 Next message should be an error 64 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>) 65 Failed to find item in given psList. 66 <DATE><TIME>|<HOST>|I|testListRemove 67 Next message should be an error 68 <DATE><TIME>|<HOST>|E|psListRemove (psList.c:<LINENO>) 69 Failed to find item in given psList. 72 <DATE><TIME>|<HOST>|E|psListRemoveData (psList.c:<LINENO>) 73 Specified data item is not found in the psList. 70 74 71 75 ---> TESTPOINT PASSED (psList{psListRemove} | tst_psList.c) … … 90 94 <DATE><TIME>|<HOST>|I|testListIterator 91 95 Following should error with 'Unexpected null pointer' 92 <DATE><TIME>|<HOST>|E|listSetIterator (psList.c:<LINENO>)93 Unexpected null pointer for psList parameter.94 <DATE><TIME>|<HOST>|I|testListIterator95 Following should error with 'Can't move to an unknown position.'96 <DATE><TIME>|<HOST>|E|listSetIterator (psList.c:<LINENO>)97 Can't move to an unknown position. Not moving the iterator position.98 96 99 97 ---> TESTPOINT PASSED (psList{psListIterator} | tst_psList.c)
Note:
See TracChangeset
for help on using the changeset viewer.
