- Download alghi testcases from here.
- Download the test: testcases.bash
- Put all tests, testcases.bash, and the '.java' file in the same folder.
- Run the test: In Linux/Mac terminal or git bash:
bash testcases.bash
- The diff shows if something is different:
for example, in Testcase 3 on operation number 6 is wrong. - If nothing is different, it looks like this:
- Check your user time to see if it's a timelimit error
Last active
December 10, 2019 13:17
-
-
Save lepiku/58cee25affab7c8b59d3ae4562fc7b50 to your computer and use it in GitHub Desktop.
Autorun Alghi Testcases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javac TP4.java -d ./ # change 'TP4.java' to your java file | |
# use -d option to compile to current directory | |
for i in {1..25}; do | |
echo "Testcase $i" | |
java TP4 < "in$i" > "my$i" # also change 'TP4' to your class name | |
time diff --strip-trailing-cr "my$i" "out$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment