Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mli42/containers_test

My tester for the 42-project ft_containers
https://github.com/mli42/containers_test

42 42cursus 42school containers cpp cpp-containers ft-containers ft-containers-42 ft-containers-test tester

Last synced: 1 day ago
JSON representation

My tester for the 42-project ft_containers

Awesome Lists containing this project

README

        

# containers_test



## Warning

This tester was made with the first version of ft_containers' subject \
Thus it does not test iterator traits (yet?) \
There aren't benchmark tests either.

Also, passing this tester does not mean the project was done correctly, please go further

## Usage

Go in your ft_containers' directory:

```bash
git clone https://github.com/mli42/containers_test.git && cd ./containers_test/
```

Expected tree:

```
. [ft_container]
├── .hpp
├── [...]
└── containers_test
└── [...]
```

If your project does not fit the expected tree (e.g. has sub-directories and/or file names are capitalized or what) \
Please edit the third line of each `.//common.hpp` (for filenames) \
Or the variable `include_path` in `fct.sh` (for special path)

Then what? \
There are a three executables! How do we use them?

```bash
./do.sh [container_to_test] [...]
./cmp_one
./one [namespace=ft]
```

Examples:
```bash
./do.sh # tests every containers
./do.sh vector list # tests only vector && list

./cmp_one srcs/list/size.cpp # prints the result comparison (ft/std) on this test file only

./one srcs/list/rite.cpp # prints the output of this test file using ft namespace
./one srcs/list/rite.cpp std # prints the output of this test file using the std
```

How to read the output ?
```
The [ ✅ / ❌ ] emojis shows if they behave the same, i.e if the STL and your implementation:
- compile the same way,
- return the same number,
- print the same output.

If a diff occurs, a deepthought is created and logs are kept.

The [Y/N] shows if the STL compile (Y) or not (N), there are some test where you should not compile.
```

## Tested features
- [x] vector
- [x] list
- [x] map
- [x] stack
- [x] queue
- [x] deque
- [x] multimap
- [x] set
- [x] multiset

## Contributors

PRs are welcomed! \
Thank you!