Add CT331 Programming Paradigms

This commit is contained in:
2023-12-07 01:33:53 +00:00
parent 38a012c323
commit 262614ce83
207 changed files with 4516 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#include <stdio.h>
#include "tests.h"
#include "linkedList.h"
void runTests(){
printf("Tests running...\n");
listElement* l = createEl("Test String (1).", 30);
//printf("%s\n%p\n", l->data, l->next);
//Test create and traverse
traverse(l);
printf("\n");
//Test insert after
listElement* l2 = insertAfter(l, "another string (2)", 30);
insertAfter(l2, "a final string (3)", 30);
traverse(l);
printf("\n");
// Test delete after
deleteAfter(l);
traverse(l);
printf("\n");
printf("\nTests complete.\n");
}