Created
January 18, 2022 20:25
-
-
Save Thibb1/7077d514a956d5948741853e99a84d70 to your computer and use it in GitHub Desktop.
Tester for Epitech Cppool d04pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "int_list.h" | |
static void populate_list(int_list_t *list_head) | |
{ | |
int_list_add_elem_at_back(list_head, 1681692777); | |
int_list_add_elem_at_back(list_head, 1189641421); | |
int_list_add_elem_at_back(list_head, 846930886); | |
int_list_add_elem_at_back(list_head, 1804289383); | |
int_list_add_elem_at_back(list_head, 1649760492); | |
int_list_add_elem_at_back(list_head, 1350490027); | |
int_list_add_elem_at_back(list_head, 1714636915); | |
int_list_add_elem_at_back(list_head, 1957747793); | |
int_list_add_elem_at_back(list_head, 424238335); | |
} | |
static void test_size(int_list_t list_head) | |
{ | |
printf("There are %u elements in the list\n", int_list_get_size(list_head)); | |
int_list_dump(list_head); | |
} | |
static void test_del(int_list_t *list_head) | |
{ | |
int_list_del_elem_at_position(list_head, 1); | |
int_list_del_elem_at_position(list_head, 3); | |
int_list_del_elem_at_position(list_head, 3); | |
int_list_del_elem_at_front(list_head); | |
printf("There are %u elements in the list\n", int_list_get_size(*list_head)); | |
int_list_dump(*list_head); | |
} | |
int main(void) | |
{ | |
int_list_t list_head=NULL; | |
populate_list(&list_head); | |
test_size(list_head); | |
test_del(&list_head); | |
int_list_clear(&list_head); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment