Last active
December 12, 2015 04:08
-
-
Save jokeofweek/4711922 to your computer and use it in GitHub Desktop.
Automated tester for COMP 251 A2.
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
for i in {1..100} | |
do | |
vars=`expr $RANDOM % 20` | |
vars=`expr $vars + 2` | |
tests=`expr $RANDOM % $vars` | |
tests=`expr $tests + $RANDOM % $vars` | |
tests=`expr $tests + $RANDOM % $vars` | |
tests=`expr $tests + $RANDOM % $vars` | |
tests=`expr $tests + $RANDOM % $vars` | |
tests=`expr $tests + $RANDOM % $vars` | |
echo "Testing $vars $tests" | |
java GenerateTests $vars $tests > a.txt | |
a=`java Assig2 a.txt` | |
b=`java Assig2 -nobrute a.txt` | |
if [ $a != $b ] | |
then | |
echo "Error:" | |
echo "Implication graph result: $a" | |
echo "Brute force result: $b" | |
echo "See failing test case in a.txt" | |
exit 1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you these two up (lines 14-15 and 19-20). :) Thanks a lot though, I found something bug in my code thanks to this. ;)