Updated test to match new name for ListNode

This commit is contained in:
Barra Ó Catháin 2024-04-15 23:34:14 +01:00
parent 9b88d092c3
commit ea76226760
1 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ void printListHeader(struct List * list)
list->itemCount, list->type, list->head, list->tail);
}
void printNode(struct Node * node)
void printListNode(struct ListNode * node)
{
printf("%p\nNext: %p\nPrevious: %p\nData: %c\n\n",
node, node->next, node->previous, *(char *)(node->data));
@ -49,7 +49,7 @@ int main (int argc, char ** argv)
*(char *)(testList->head->data) == 'A'));
// Test 3:
deleteNodeFromList(0, testList);
deleteListNodeFromList(0, testList);
TEST("Deleting a single item from the list",
(testList->head == NULL &&
testList->tail == NULL &&
@ -69,7 +69,7 @@ int main (int argc, char ** argv)
testList->tail->previous == testList->head));
// Test 5:
deleteNodeFromList(1, testList);
deleteListNodeFromList(1, testList);
TEST("Deleting tail from the list",
(testList->itemCount == 1 &&
testList->head != NULL &&
@ -79,7 +79,7 @@ int main (int argc, char ** argv)
// Test 6:
appendToList(PLAYER, testList, &testDataB);
deleteNodeFromList(0, testList);
deleteListNodeFromList(0, testList);
TEST("Deleting head from the list",
(testList->itemCount == 1 &&
testList->head != NULL &&
@ -88,7 +88,7 @@ int main (int argc, char ** argv)
*(char *)(testList->head->data) == 'B'));
// Test 7:
deleteNodeFromList(0, testList);
deleteListNodeFromList(0, testList);
appendToList(PLAYER, testList, &testDataA);
appendToList(PLAYER, testList, &testDataB);
appendToList(PLAYER, testList, &testDataC);
@ -104,7 +104,7 @@ int main (int argc, char ** argv)
testList->tail->previous == testList->head->next));
// Test 8:
deleteNodeFromList(1, testList);
deleteListNodeFromList(1, testList);
TEST("Deleting an item in middle of the list",
(testList->itemCount == 2 &&
testList->head != NULL &&
@ -116,7 +116,7 @@ int main (int argc, char ** argv)
testList->tail->previous == testList->head));
// Test 9:
deleteNodeFromList(1, testList);
deleteListNodeFromList(1, testList);
appendToList(PLAYER, testList, &testDataB);
appendToList(PLAYER, testList, &testDataC);
TEST("Checking for data in the list using comparison function",