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
.
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
Useful tool to visualise your algorithm graphically. Program created by .
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
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"
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 releasing the first version of the tester for Linux.
gemartin |
◦ Email: [email protected]
◦ Linkedin: https://www.linkedin.com/in/gemartin99/
◦ 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-