/ft_containers-unit-test

📝 One of the most difficult to complete and easy to install unit tester for ft containers project

Primary LanguageC++

ft_containers-unit-test

screenshot

About

ft_containers-unit-test is a complete testing for project of school 21/ecole 42 and allowing you test your containers: Vector, Stack, Map, Set and Utilities in ft namespace.
This test checks 90% of subject and checklist requires: using std allocator, iterator traits, benchmark, leaks, segfaults, timeouts etc. But keep in mind that test doesn't check something you don't need to implement and was written by students, so im waiting for your bugs or suggestions for improving

Getting started

⬇️ 1. Installation

run this command inside your ft_containers folder:

git clone https://github.com/divinepet/ft_containers-unit-test

then

cd ft_containers-unit-test

now you need to configure file config.hpp and write correct names of all your files and classes

🛠 2. Configure your config.hpp

if you haven't some class implementation yet, for example Map, you need to comment appropriate line in config.hpp:

// #define MAP     "../../../Map.hpp"

and etc. for other. The same with flags - uncomment this line to enable them

#define FLAGS

📝 3. Run start.sh

Now you can execute start.sh and testing will start

Also you can run tests with a specific container, use flags for this:

./start.sh -v # for vector
./start.sh -u # for utilities
./start.sh -st # for stack
./start.sh -m # for map
./start.sh -s # for set
./start.sh -h # help with commands

Use the -fast flag to run the test in simplified mode - the amount of data processed by each container is reduced to speed up its execution.

🐧 Running on Linux

In most cases it should resolve many conflicts:

  1. comment these lines: line 32, line 35, line 24
  2. add libraries in this file:
#include <string.h>
#include <sys/wait.h>
  1. remove this file from project

Results

NOT COMPILED means that method compiles with errors, also probably some template name in config.hpp is incorrect
TIMEOUT means the method exceeded the maximal execution time, probably due to an infinite loop

Press Star ⭐ button at the top right corner of page if this test was useful to you, so that more people can see it