GithubHelp home page GithubHelp logo

aldisti / push_swap-tester Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 182 KB

A simple shell script to test the push_swap project of the 42Cursus

Shell 99.12% Python 0.88%
42pushswap tester pushswap-tester 42 42tester bash-script

push_swap-tester's Introduction

push_swap_tester

Installation

First, go to the root of your repository (which is where you can find your Makefile) and do:

git clone https://github.com/Aldisti/push_swap_tester.git

after this you have to compile your push_swap and if you have done the bonus part then you have to compile it too. If your Makefile is correct you can do:

make all

next just go inside the tester folder with this command:

cd push_swap_tester

now you can test your push_swap with a bash script, it's easy to use so don't be scared by this long README. Enjoy the tester!

Usage

The bash script is an executable file, so you can run it just by typing ./tester. But to use it you have to add an option, at the moment there are 4 different options. You can see them doing:

./tester --help

the output you'd get should be like this:

 ./tester m	checks for the mandatory part
 ./tester b	checks for the bonus part
 ./tester a	checks for both, mandatory and bonus
 ./tester c	allows you to do custom tests
 ./tester r	allows you to do custom tests in a range of numbers
  -h, --help	display this help and exit

now if you want to test the mandatory part of the project just run:

./tester m

it's the same with the options 'b' and 'a', but if you want to do a custom test you can use the option 'p' with 2 arguments: the stack size and the number of tests to perform.

e.g. if you want to perform 15 tests with a stack size of 500 integers you can do:

./tester p 500 15

Output

After running the test you'll get an output like this: Tests: 15 Size: 500 OK: 15 KO: 0 If all tests are ok then the number after 'OK:' will be colored accordingly to the maximum number of moves made (the grade will be based on the evaluation sheet).

Colors table:

๐ŸŸฉ is for grade 5/5
๐ŸŸฆ is for grade 4/5
๐ŸŸจ is for grade 3/5
๐ŸŸง is for grade 2/5
๐ŸŸฅ is for grade 1/5

Bug report

If you find some bugs or errors of any type, please, report them to me. You can contact me on slack: @adi-stef

push_swap-tester's People

Contributors

aldisti avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.