Skip to content

Latest commit

 

History

History
97 lines (66 loc) · 2.41 KB

readme.md

File metadata and controls

97 lines (66 loc) · 2.41 KB

ft_containers tester 🏴‍☠️

Installation

Go into your project folder and type:

git clone https://github.com/lsarrazi/ft_containers_tester.git tester && cd tester

Installation + Base Test 🍮

git clone https://github.com/lsarrazi/ft_containers_tester.git tester && cd tester && ./test.sh base/*/*

Set your project path in test.sh

ftcontainers_path=".." # Path to your project headers

Your headers should be named in lowercase, like "vector.hpp".

Usage

Run all base tests

./test.sh base/*/*

Run all base tests + all bonus tests

./test.sh base/*/* bonus/*/*

Run specific container only

./test.sh base/list/*

Run specific test only

./test.sh base/list/constructor

Debug mode

Run debug mode (specific test only)

./test.sh debug base/list/constructor

Debug mode displays compilation errors and runs lldb in case of crash.

Dependencies

This script depends on the following programs: *optional

  • Compiler: clang++, g++ (Could be set in test.sh)
  • Debugger: lldb, gdb (Could be set in test.sh)
  • Debugging tool: valgrind*
  • Shell: bash

Install LLDB and valgrind 👍

sudo apt-get install valgrind lldb-10 && ln -s /usr/bin/lldb-10 /usr/local/bin/lldb

Informations

Each test attempts to debug a particular function. The tests may depend on different functions.

You will be able to find these files in each test directory:

  • log.txt: The compilation logs
  • expected.txt: The output that your library should produce to succeed the test
  • out.txt: The actual output that your library produce
  • diff.txt: The difference between expected.txt and output.txt
  • valgrind.txt: The output of valgrind

Each test is executed independently of the others in its own executable.

Tests are compiled and run in parallel to maximize performance.

The majority of the original tests are copies from https://www.cplusplus.com/reference/stl/

Here is what it looks like:

alt text

Author comment

The tests provided are insufficient for a complete debugging of a standard library, as well as a correct and conscientious correction to the ft_containers project. Please consider this when using the tester.

Author / Contributor

Everyone can contribute by enhancing a test or adding a new one. Just make a pull request

  • lsarrazi 👑