Changeset 3112 for trunk/psLib/test/collections/tst_psList.c
- Timestamp:
- Feb 2, 2005, 1:59:36 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psList.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psList.c
r3111 r3112 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-02-02 2 1:58:48$8 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-02-02 23:59:36 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 460 460 psFree(data); 461 461 // verify that the size incremented 462 if (list->size != 6 || *(psS32 *)list->tail->prev-> data != 7) {462 if (list->size != 6 || *(psS32 *)list->tail->prev->prev->data != 7) { 463 463 printListInt(list); 464 464 psError(PS_ERR_UNKNOWN, true,"psListAdd didn't insert to position #2."); … … 597 597 } 598 598 599 data = (psS32*)psListGet(list,-2); 600 if (data == NULL || *data !=2) { 601 psError(PS_ERR_UNKNOWN,true,"psListGet failed with location=-2"); 602 return 9; 603 } 604 599 605 psFree(list); 600 606 … … 682 688 } 683 689 690 data = psListGet(list,-2); 691 // Test requirement SDR-173 692 if ( (! psListRemove(list,-2)) || 693 (psListGet(list,-2) == data) ) { 694 printListInt(list); 695 psError(PS_ERR_UNKNOWN, true,"Failed to remove from location -2"); 696 return 11; 697 } 698 699 if (list->size != --items) { 700 printListInt(list); 701 psError(PS_ERR_UNKNOWN, true,"Didn't decrement size properly to %d.",items); 702 return 1; 703 } 704 684 705 // 6. psListRemoveData where data=NULL (error) 685 706 psLogMsg(__func__,PS_LOG_INFO,"Next message should be an error");
Note:
See TracChangeset
for help on using the changeset viewer.
