HI, I'm here to guide you in using comprehensive testing for your project
here are some good testers you can test your code with
- ft_containers terminator : https://github.com/Mikastiv/ft_containers-terminator?ref=morioh.com&utm_source=morioh.com
It's a great tester, It has many decent tests for each costum container, it tracks the leaks and alive objects (objects that never got destroyed), and more than that, you can test each method separately and see the difference between your container and the container provided by the standard library
- ft_container UNITest : https://github.com/mamoussa405/ft_containers_tests
this tester does not just test the container with good tests, it also tests the time and speed of the methods provided by the container and compares it the built-in stl containers to see if your code is fast enough test with this tester but i personally like the first tester more since it provide more complex tests and leaks checking
i recommend starting with the second tester (UNITest) to get your hand dirty with testing and solve the basic riddles after you made sure that this tester shows OK in all the test cases you can pass to the first tester which has some more complex and advanced test cases
Run every tests:
./test_containers.sh
Run one or more container tests:
./test_containers.sh <CONTAINER_1> ... <CONTAINER_N>
Example:
./test_containers.sh vector stack ...
Run individual tests:
./test_files.sh <CONTAINER> <TEST_1> ... <TEST_N>
Example:
./test_files.sh vector erase clear ...
You can create a executable (debug.out) for debugging a particular test with:
./debug_test.sh <CONTAINER> <TEST>
Example:
./debug_test.sh vector erase
change the "CHECK_CAPACITY" function macro body to print the capacity directly instead of comparing the capacity with size for the tests to be more precise despite the iterator passed to the function (Biderictional iterator, input iterator, or random access iterator; each of these iterators differs in how the algorithm is implemented on the container) so the tests will be more generic.