Autotester for Inf2D - coursework 1: graph search
-
numNodes
: The tester assumes you do not make use of the numNodes variable (tbf, there are no variables in Haskell). It does not make sense to use it, and I think this means they'll only test thenext
function with 4x4 graphs. Anyways, I do not because edge cases are important, so if you usenumNodes
, you should replace it with(ceiling . sqrt . fromIntegral . length $ graph)
wherever you use it (assuming your graph is calledgraph
and is in scope). -
undefined
: The code should still work if you have a function which is undefined, if that is not the case create an issue or text me directly. -
DICE: A bunch of things can go wrong on dice, look below for how to run on dice.
-
Updates: The tester updates itself through
git pull
. Make sure you run it from its directory and install withgit clone
rather than copying files. -
Autotests: These are autogenerated tests, they might be wrong. I check for equivalent results, but if you're failing and think you're right send me a screenshot and I'll check.
-
Errors: The rest of the tests is written by hand and checks what is, to my understanding, the expected answer. If you think I'm wrong then idk.
-
STAR THE REPO.
-
Anything else: just shoot me a text on messenger.
Just git clone where your coursework files are:
git clone https://github.com/lollobaldo/Inf2D-cw1--autotester.git
Just cd
into the repository and run the runTests
command (remember to give executable permission on Linux):
ghc
must be in your path, look below for common errors
module add ghc
cd Inf2D-cw1--autotester
chmod +x runTests.sh
./runTests
runghc: not found
: it meansghc
is not in your path, runmodule add ghc
and try again;module: command not found
: runsource /etc/profile.d/modules.sh
and try again- If you see some scrambled letters instead of a nice table, run with the
--windows
flag:./runTests --windows
.
cd Inf2D-cw1--autotester
runTests.bat
Note: needs Git bash to run on Windows, VSCode terminal might not supported unless you use powershell.
The Tester only shows the details of the first 5 failed tests. If you want to see all the results, pass it a --show-all
flag. This might result in a LOT of stuff displayed.
The Tester does not show the inputs for the autogenerated graphs, as these are BIG (like, from 10x10 to 50x50 matrices). Pass a --show-detailed-auto
if you still want to show those.
The Tester currently stops a function if it does not return any value after 5 seconds. Pass it a --no-timeout
flag if you want to run it indefinitely.
❗NOTE: this may result in a stack/heap overflow error
Pass it a --no-meme
flag if you don't like to see LambdaMan 😢
Shoot me a text on Facebook if there's anything wrong.