Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/gemartin99/Push-Swap-Tester

Push_swap tester and bonus tester + GUI pro checker
https://github.com/gemartin99/Push-Swap-Tester

42 42born2code 42cursus 42projects 42school 42tester educational pushswap pushswap-42 pushswap-tester tester

Last synced: about 2 months ago
JSON representation

Push_swap tester and bonus tester + GUI pro checker

Awesome Lists containing this project

README

        

# 🔢 Push_swap Tester

## This tester contains:

### 🔹 Error handling.

### 🔹 All the cases between 2 and 5 numbers. Check sorting and less movements than the mandatory.

### 🔹 Infinit test of 100 numbers and 500, and prints the moves that your algorithm does.

### 🔹 A test for each case between 1 and 500.

### 🔹 Test if the arguments is already sorted.

### 🔹 Show this min, max and average of all tests.

### 🔹 Check memory leaks.

### 🔹 Check for the bonus.

## How to use

The push_swap_test.sh or push_swap_test_linux.sh file and the checker_mac or checker_linux should be in the same directory where is the push_swap program. Once the terminal is open and we are in the project directory we executed this command:

If you don't have MacOS, instead of running push_swap_test.sh, execute push_swap_test_linux.sh

```bash push_swap_test.sh```

We also can add two arguments that will be the times that we executed the 100 and 500 tests. If you don't put arguments, it will execute 200 for each test by default.

```bash push_swap_test.sh 250 250```.

Screen Shot 2022-10-09 at 11 06 42 PM

If you would like to execute the bonus. If you don't put arguments, it will execute 200 for each test by default.

```bash push_swap_test.sh -b```.

And if you want to define the quantity for 100 and 500 tests:

```bash push_swap_test.sh -b 100 100```

Screen Shot 2022-10-10 at 3 12 48 AM

### ❗️ You can check the sended arguments that makes your program fail with the traces.txt file ❗️

# 👀 Pushswap visualizer

Useful tool to visualise your algorithm graphically. Program created by ![ailopez-o](https://github.com/ailopez-o).

[VISUALIZER REPO](https://github.com/ailopez-o/42Barcelona-PushSwap-ProChecker)

If you want to run it, type the following command. The number represents the number of arguments push_swap will receive.

```bash push_swap_test.sh -v 500```

Screen Shot 2023-01-13 at 5 23 58 PM

If you want to run the viewer with specific arguments use the following command followed by the desired arguments in double quotes.

```bash push_swap_test.sh -v2 "1 4 2 3 5"```

## Controls 🕹

|KEY|ACTION|
|---|---|
|`I`| Step by Step instructions|
|`S`| Run all the instructions|
|`P`| Pause |
|`1`| exec 'sa'|
|`2`| exec 'sb'|
|`3`| exec 'ra'|
|`4`| exec 'rb'|
|`5`| exec 'rra'|
|`6`| exec 'rrb'|
|`7`| exec 'pa'|
|`8`| exec 'pb'|
|`ESC ❌`|Close|

Extra acknowledgements for [@nunom4chado](https://github.com/nunom4chado) releasing the first version of the tester for Linux.

# Author ✍🏼


100px
gemartin

Intra 42

# I hope you liked and helped! 😁

# Maybe it would interest you!

### - To check my progression in 42 common core ↙️

[HERE](https://github.com/gemartin99/42cursus)

### - My 42 intra profile ↙️
[HERE](https://profile.intra.42.fr/users/gemartin)

# Contact 📥

### Contact with me if you fine some errors! That will help future students! 😁

◦ Email: [email protected]

◦ Linkedin: https://www.linkedin.com/in/gemartin99/

# Ailopez Contact 📬

### Contact him if you find any errors in the display! It may help future students! 😁

◦ Email: [email protected]

◦ Linkedin: https://www.linkedin.com/in/aitor-lopez-de-audicana-70125b38/

◦ Github: https://github.com/ailopez-o

◦ His 42 intra profile: https://profile.intra.42.fr/users/ailopez-