Changeset 881
- Timestamp:
- Jun 4, 2004, 2:35:01 PM (22 years ago)
- Location:
- trunk/psLib/test/sysUtils
- Files:
-
- 5 edited
-
tst_psHash00.c (modified) (1 diff)
-
tst_psHash01.c (modified) (2 diffs)
-
tst_psHash02.c (modified) (1 diff)
-
tst_psHash04.c (modified) (2 diffs)
-
verified/tst_psHash04.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psHash00.c
r860 r881 1 1 /***************************************************************************** 2 This code will test whether a hash table can be allocated successfully. 2 This code will test whether a hash table can be allocated successfully, 3 then deallocated successfully. 3 4 *****************************************************************************/ 4 5 #include <stdio.h> -
trunk/psLib/test/sysUtils/tst_psHash01.c
r860 r881 1 1 /***************************************************************************** 2 2 This code will test whether a hash table can be de-allocated successfully. 3 4 GUS: figure out how the memory leak detection stuff works, then put it5 in here.6 3 *****************************************************************************/ 7 4 #include <stdio.h> … … 54 51 psHashFree(myHashTable, (void (*)(void *))IdFree); 55 52 56 //57 // GUS: put some memory leak stuff here.58 //59 60 53 if (imGlobal != 4) { 61 54 fprintf(stderr, "%s: only (%d/4) entries were freed", -
trunk/psLib/test/sysUtils/tst_psHash02.c
r861 r881 1 1 /***************************************************************************** 2 This code will test whether hash tables entries can be inserted correctly. 2 This code will test whether hash tables entries can be inserted correctly, 3 and retrieved correctly. 3 4 4 5 GUS: Add code to test whether duplicates are handled correctly (use a -
trunk/psLib/test/sysUtils/tst_psHash04.c
r861 r881 38 38 int currentId = psMemGetId(); 39 39 int memLeaks = 0; 40 psDlist *myLinkList = NULL; 41 psDlistElem *tmp = NULL; 40 42 41 43 printPositiveTestHeader(stdout, … … 50 52 i++; 51 53 } 54 myLinkList = psHashKeyList(myHashTable); 55 tmp = myLinkList->head; 56 while (tmp != NULL) { 57 printf("Linked List Entries: %s\n", (char *) tmp->data); 58 tmp = tmp->next; 59 } 52 60 53 // 54 // GUS: add call to psHashKeyList() 55 // 56 psHashKeyList(); 61 psDlistFree(myLinkList, NULL); 57 62 58 63 printFooter(stdout, -
trunk/psLib/test/sysUtils/verified/tst_psHash04.stdout
r588 r881 5 5 \----------------------------------------------------------------------------------/ 6 6 7 This has not been coded. 7 Linked List Entries: ENTRY03 8 Linked List Entries: ENTRY02 9 Linked List Entries: ENTRY01 10 Linked List Entries: ENTRY00 8 11 9 12 ---> TESTPOINT PASSED (psHash functions{psHashKeyList()} | tst_psHash04.c)
Note:
See TracChangeset
for help on using the changeset viewer.
