Skip to content

Push_swap tester and bonus tester + GUI pro checker

Notifications You must be signed in to change notification settings

nunom4chado/Push-Swap-Tester

 
 

Repository files navigation

🔢 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_OS.sh file and the checker_OS 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:

bash push_swap_test_OS.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_OS.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_OS.sh -b.

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

bash push_swap_test_OS.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.

VISUALIZER REPO

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_OS.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_OS.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

I hope you liked and helped! 😁

Maybe it would interest you!

- To check my progression in 42 common core ↙️

HERE

- My 42 intra profile ↙️

HERE

Contact 📥

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

◦ Email: gemartin@student.42barcelona.com

◦ 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: ailopez-@student.42barcelona.com

◦ 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-

About

Push_swap tester and bonus tester + GUI pro checker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%