Changeset 953 for trunk/psLib/test/collections/tst_psList.c
- Timestamp:
- Jun 9, 2004, 11:20:53 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/collections/tst_psList.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/collections/tst_psList.c
r950 r953 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-06-09 2 0:56:23 $8 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-06-09 21:20:53 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 47 47 int testListAlloc(void) 48 48 { 49 int currentId = psMemGetId();50 49 psList* list; 51 50 int ref; … … 108 107 psListFree(list,PS_FREE); 109 108 110 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {111 psError(__func__,"Memory Leaks Detected");112 return 64;113 }114 psMemCheckCorruption(1);115 116 109 return 0; 117 110 } … … 119 112 int testListAdd(void) 120 113 { 121 int currentId = psMemGetId();122 114 psList* list = NULL; 123 115 int* data = NULL; … … 289 281 290 282 psListFree(list, PS_FREE); 291 292 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {293 psError(__func__,"Memory Leaks Detected");294 return 64;295 }296 psMemCheckCorruption(1);297 283 298 284 return 0; … … 323 309 int testListGet(void) 324 310 { 325 int currentId = psMemGetId();326 311 psList* list = NULL; 327 312 int* data; … … 418 403 psListFree(list,PS_FREE); 419 404 420 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {421 psError(__func__,"Memory Leaks Detected");422 return 64;423 }424 psMemCheckCorruption(1);425 426 405 return 0; 427 406 } … … 429 408 int testListRemove(void) 430 409 { 431 int currentId = psMemGetId();432 410 psList* list = NULL; 433 411 int* data; … … 658 636 psListFree(list,PS_FREE); 659 637 660 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {661 psError(__func__,"Memory Leaks Detected");662 return 64;663 }664 psMemCheckCorruption(1);665 666 638 return 0; 667 639 … … 671 643 { 672 644 673 int currentId = psMemGetId();674 645 psList* list = NULL; 675 646 psVector* vec = NULL; … … 720 691 psListFree(list,PS_FREE); 721 692 722 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {723 psError(__func__,"Memory Leaks Detected");724 return 64;725 }726 psMemCheckCorruption(1);727 728 693 // test vector -> dlist 729 694 … … 800 765 psListFree(list,PS_FREE); 801 766 802 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {803 psError(__func__,"Memory Leaks Detected");804 return 64;805 }806 psMemCheckCorruption(1);807 808 767 return 0; 809 768 } … … 811 770 int testListIterator(void) 812 771 { 813 int currentId = psMemGetId();814 772 psList* list = NULL; 815 773 int* data; … … 936 894 psListFree(list,PS_FREE); 937 895 938 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {939 psError(__func__,"Memory Leaks Detected");940 return 64;941 }942 psMemCheckCorruption(1);943 944 896 return 0; 945 897 } 898 899 int testListFree(void) 900 { 901 902 /* 903 Call psDlistAlloc to create a doubly linked list. Create several data items and add them to the list. 904 Verify items are within the list. Verify the data item's reference counter are incremented after adding 905 to the list. Call psDlistFree with NULL specified as the elemFree function. Verify the list is 906 deallocated but not the data items. Verify the data item's reference counters are decremented by one 907 compared to when added to the list. 908 */ 909 910 return 0; 911 }
Note:
See TracChangeset
for help on using the changeset viewer.
