Lab 3 Test Suite

Programming Language Technology, 2018


Before you submit lab 3, your solution must pass the testsuite. This document describes how to obtain and use this testsuite.

NOTE: After some time, we may chose to add more test cases. We recommend that you use the latest version of the test suite to check your solution before submission. This helps you catch errors that you would otherwise have to wait for the grader to spot.

If you encounter problems, send mail to the teachers or to the course Google group.


You will only need to do this part once.

  1. Make sure that at least version (December 2015) of the Haskell package directory is installed:
      $ ghc-pkg latest directory

  2. Download lab3-testsuite.tar.gz.

  3. Unpack the downloaded file:
      $ tar -zxf lab3-testsuite.tar.gz

  4. Enter the lab3-testsuite directory:
      $ cd lab3-testsuite

  5. Compile the test program using make or alternatively:
      $ ghc -threaded --make -o progs-test-lab3 progs-test-lab3.hs

Running the testsuite

This is what you need to do to test your solution.

  1. Enter the lab3-testsuite directory (if you are not there already):
      $ cd lab3-testsuite

  2. Run progs-test-lab3 with the path to the directory where your solution is located:

      $ ./progs-test-lab3 path/to/your/solution/

If you have implemented compilation of floating point operations, you can also test your compiler on the full test suite of lab2. To this end, invoke the test suite with the --doubles flag:

  $ ./progs-test-lab3 --doubles path/to/your/solution/