2

i have completed server.c and now I want to test it! What command do I type in terminal?

2

"When all else fails, read the directions."

All of this is described in the pset instructions, including how to start the server and how to test it. You just need to go through it and do what it says.

4
  • Also how are you sure you have completed the server if you haven't run it once? And how did you know what to do without reading the instructions? – ChrisG Sep 7 '15 at 7:40
  • Since most of the problem set is string manipulation he/she could have used a test program using printf. Now they want to see if their code works in the proper server file after copying over. I only say this because this is what I did initially to get to grips with the string functions. – user9993 Nov 23 '15 at 5:16
  • I haven't noticed any instructions concerning running my server as well. Only staff's implementation. – Webars Jun 7 '16 at 18:06
  • This question was asked about the previous year's pset6, which was done in a different environment. In any case, even in the current year's environment, anyone at this point in the class should be able to use the instructions to implement the staff solution in order to start their own version in the same environment. – Cliff B Jun 7 '16 at 19:25
0

You can try writing unit tests using the specifications in the directions.

For example:

/**
 * Test the load() function.
 */
void test_load(void)
{
    BYTE* content = NULL;
    size_t length = 0;
    FILE* fp = NULL;

    if (load(fp, &content, &length))
    {
        printf("Fail: expect default behavior to return false.");
    }
}

I've published my tests for pset6 here: https://gist.github.com/dkinzer/1ad4dfefd1e48fdb4c7d8a52d2ea3b07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .