Skip to content

lollobaldo/Inf2D-cw1--autotester

Repository files navigation

Inf2D-cw1--autotester

Autotester for Inf2D - coursework 1: graph search

Notes

  • 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 the next function with 4x4 graphs. Anyways, I do not because edge cases are important, so if you use numNodes, you should replace it with (ceiling . sqrt . fromIntegral . length $ graph) wherever you use it (assuming your graph is called graph 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 with git 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.

Installation

Just git clone where your coursework files are:

git clone https://github.com/lollobaldo/Inf2D-cw1--autotester.git

Usage

Just cd into the repository and run the runTests command (remember to give executable permission on Linux):

Linux/DICE

ghc must be in your path, look below for common errors

module add ghc
cd Inf2D-cw1--autotester
chmod +x runTests.sh
./runTests

Common errors:

  • runghc: not found: it means ghc is not in your path, run module add ghc and try again;
  • module: command not found: run source /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.

Windows

cd Inf2D-cw1--autotester
runTests.bat

Note: needs Git bash to run on Windows, VSCode terminal might not supported unless you use powershell.


--show-all

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.

--show-detailed-auto

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.

--no-timeout

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

--no-meme

Pass it a --no-meme flag if you don't like to see LambdaMan 😢

Bugs

Shoot me a text on Facebook if there's anything wrong.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published