Assignment 2: Test Your Code

I hope everyone is having fun writing your own reliable file transfer program in Assignment 2.

I am releasing the code we will use to test your program. You can use it to check if your code will survive our test cases.

To run the test, execute

~sadm/a2/check.sh <port>

on cs2105-z.comp.nus.edu.sg (replace <port> with your favourite port number).

Note that, passing the test cases just means that your code behaves correctly when tested, it does not mean that your code is correct.

The test script is experimental, so please report if it fails to run.

8 comments to Assignment 2: Test Your Code

  1. GAO RISHENG says:

    Hi, professor. I run the program and passes all the 9 cases (may I know the number is correct?). The program goes back to test case 1 after finish test case 9 and so on and so for. This comes to an infinite loop….(at least I run it for 10 minutes) May I know is there a bug in the test program or a bug in my program? Thank you very much.

    • Eugene Lim says:

      Hi, I’ve just tested it, just let the code run, there’s a total of 27 tests (3 x 9 tests). It does terminate.
      The test cases do restart counting from 1 after 9 though.

  2. Eugene Lim says:

    Hi Prof, the script doesn’t terminate, it restarts to 1 after passing test case 9.

  3. GAO RISHENG says:

    OK,Problem solved. Thank you very much!

  4. Khyathi says:

    The script still doesn’t terminate for me and neither does it include the round number. Is someone else facing the same problem?

Leave a Reply