minthe's blog

By minthe, history, 2 months ago, In English

I'm creating a problem in Polygon that will include a grader. My grader has several assert statements (and all the testing is done using these assertions). The problem is that contestants can't see the error message if any assertion fails.

Right now the test result shows Runtime Error and the message is "Exit code was 3". And I'd like to make it possible for contestants to see the exact assertion message.

How does one propagate the error message forward to the test results?

 
 
 
 
  • Vote: I like it
  • +16
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Looking forward to your suggestions

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Have you tried the TESTLIB equivalent of assert?

assert(cond, "message")

translates to

ensuref(cond, "message")

IIRC, the message in ensuref is propagated to end user.