Instead of checking if the tested program's output matches the given output files, Toster can provide a checker program (written in C++) with the contents of the input and program output, and use it to check if the output is correct. This can be implemented by adding a new flag (-c or --checker for example, replacing -c previously used for setting the compile command).
The proposed protocol for checker programs would be the following:
The checker receives the contents of the input file and the output of the tested program on stdin, separated by a single \n character
The checker verifies if the output is correct
The checker outputs C if the output is correct, or I <OPTIONAL_DATA> if the output is incorrect. The optional data can include any data useful for understanding why the output is wrong (for example Film number 1 wasn't finished on time) and will be shown when errors are displayed
Instead of checking if the tested program's output matches the given output files, Toster can provide a checker program (written in C++) with the contents of the input and program output, and use it to check if the output is correct. This can be implemented by adding a new flag (
-c
or--checker
for example, replacing-c
previously used for setting the compile command). The proposed protocol for checker programs would be the following:\n
characterC
if the output is correct, orI <OPTIONAL_DATA>
if the output is incorrect. The optional data can include any data useful for understanding why the output is wrong (for example Film number 1 wasn't finished on time) and will be shown when errors are displayed