Yes another Tester for ft_containers! This one is written completely in C++98 and can be executed trough make
git clone https://github.com/toni-schmitt/ft_containers-modular-tester.git
- Clone the tester into your ft_containers directory.
- If needed: Configure the Path to your .hpp files in the Makefile. (
make configfor help)
- If needed: Configure the Path to your .hpp files in the Makefile. (
- Print all available commands with
make help - Test until everythig is Successful
- Execute all tests with
make test - Execute a single test with
make test C=container T=test(for example:make test C=vector T=modifiersormake test CONTAINER=vector TEST=modifiers) - Execute all tests without Benchmarking with
make no_bench
- Execute all tests with
Adding a Test Case is super easy, just follow these steps (I added 'insert_basic' Test Case to 'vector')
Show Description
- Add a
.hppfile undertests/src/tests/[Container]([Container]being the Container you want to add a Test Case) (it is advised to follow the existing Naming Convention for your newly added.hppfile) - Copy the contents from
tests/src/tests/example_test.hppinto your newly added.hppfile - Modify the copied content in your newly added
.hppfile- Modify
CONTAINER_NAMEto the Container ([Container]) you wanted to add a Test Case to- Important:
CONTAINER_NAMEhas to be the same as[Container](the Folder)
- Important:
- Modify
TEST_CASE_NAMEto your Test Case Name (the Name does not have to be the same as the.hppfile, but it is advised to do so)
- Modify
- Add your own Tests
- Every Test works with log files, it is advised to write a lot of stuff into these log files
- You can write to the Log file with
ofsand with thewrite::namespace defined intests/src/utility/write.hpp
- You can write to the Log file with
- Every Test works with log files, it is advised to write a lot of stuff into these log files
Show Description
- Go to
tests/src/tests/[Container]/test_objects.hpp #includeyou newly added.hppfile- Find the correct place for the new Test Object
- The Test Objects are orderd alphabetically, first listing
generic::Test Objects (if any) and then listing[Container]::Test Objects
- The Test Objects are orderd alphabetically, first listing
- Add a Test Object for
::std[](with Template parameterContainerSTD) - Add a Test Object for
::ft[](with Template parameterContainerFT)




