collaborative testing for libft project, feel free to contribute
C 98.36%Makefile 1.64%
libft_tests's Introduction
first Draft
Collaborate on libft tests, everything here is open to suggestions
This is hopefully a way to both practice git collaboration and create a robust and efficent series of tests for the libft project.
Its a work in progress as we all still have to actually do the project
GOALS
have a robust series of tests which give meaninful error message
have a main.c a .h and a testfunction.c for each lib function
these sholud compile to .o files which are subsequently linked and compiled with your own libft like so:
HOW TO INSTALL AND RUN TESTS
git clone repo to your machine
Change LIBDIR variable in the Makefile according to your folder structure. That should be the folder containing your libft.a file.
Change the same path in libft_tests.h file libft.h header include.
Make and proceed with tests.
HOW TO ADD TESTS
Create file in the root named test_ft_FUNCTIONNAME.c
Write the tests using predefined templates TESTF(function_name) in the beginning; TESTN(test_number) to initialize each test and TESTOK(test_number) or TESTFAILED(test_number) to validate results.
Add void test_ft_FUNCTIONNAME(void) prototype to libft_tests.h header file
Add function call to test_ft_FUNCTIONNAME() in libft_tests_main.c file
Compile tests with make re
Run with ./test_ft
TO DO
add more tests
figure out a way to share libft.a across different users via global file/variable