core111.cc input?

9 views
Skip to first unread message

David García Sánchez

unread,
Feb 18, 2012, 12:14:17 PM2/18/12
to proglang-c...@googlegroups.com
The program seems to need a number, but its input file (core111.cc.input) is empty. Since it's empty a Runtime Error is raised by the interpreter trying to read a number when interpreting "readInt()"

The source code of core111.cc is

int main () {
  printInt(readInt()-1);
  return 0;
}

//void printInt(int x) { }
//int readInt() { return 4; }

If I put in the input file "4" and in the output file "3", the test is passed, so the interpreter actually works.

Thanks for the attention. Best regards.

--
David García Sánchez
MSc Student, Computer Science
ARCO Research Group (Computer Architecture and Networks)
School of Computer Science, ESI.
UCLM, University of Castilla-La Mancha
Ciudad Real
Spain

Tobias Svensson

unread,
Feb 19, 2012, 4:48:26 PM2/19/12
to proglang-course-2012
I am having this issue as well, although in my case the testsuite
simply stops forever at this test. It is probably different since I am
programming in Haskell, which doesn't seem to have all that stellar
IO. Strangely, giving 5 in input and 4 in output, does not solve the
problem, the suite still stops at this test?

Perhaps it would be suitable to have the suite automatically interrupt
specific tests if they do not finish within say 30 seconds? That way
at least you can run the rest of the tests.

Regards,
Tobias Svensson

On Feb 18, 6:14 pm, David García Sánchez <dave.alca...@gmail.com>
wrote:

David García Sánchez

unread,
Feb 19, 2012, 6:22:08 PM2/19/12
to proglang-c...@googlegroups.com
I can run all the tests. If I ignore the error of the core101.cc (about the function headers declared) and this I/O-issue of core111.cc, the testsuite finishes with all tests passed.

But since I'm not using Haskell I don't know if is there any special reason about that or not.

Kind regards.
Reply all
Reply to author
Forward
0 new messages