Skip to content

The-Tests-at-the-End-of-the-Universe/libft_tester

Repository files navigation

lol


Logo

libft_tester

What are unit tests?

Report Bug · Request Feature

About The Project

libft is the first project at Codam. This is a tester to test out all the functions for edge cases or memory violations.

Installation

  1. Clone the repo in libft folder, --recursive flag is for submodules, and is necessary otherwise some tests may not run.
cd libft
git clone git@github.com:The-Tests-at-the-End-of-the-Universe/libft_tester.git --recursive
  1. cd into directory
cd libft_tester
  1. run bash script
bash tester.sh

Usage

  • run help flag with script to see all options
bash tester.sh --help
  • run tests without norminette
bash tester.sh -nn
  • run tests without forbidden function test
bash tester.sh -nf
  • run tests without memory tests
bash tester.sh -nm
  • run tests with strict (fail tests)
bash tester.sh -s

Contributing

To contribute, a pull request can be made to add changes that you want to add. Look at the open issues to see how you could contribute.

General structure of tester

  1. run tester.sh
  2. compile unit tests in c together with libft
  3. script runs norminette test
  4. script runs forbidden function test
  5. script run tests per function together with valgrind
  6. unit tests are all in one file per function, tests in c print out fail or success and returns exit code + prints errors out in stderr
  7. script catches unit tests errors and valgrind errors and redirections them to log files.

License

Distributed under the MIT License. See LICENSE.txt for more information.