42_EXAM
42_EXAM copied to clipboard
do_op tests expects a very different result from what the subject asks for
According to the subject, we should expect that the user will input the parameters perfectly and hence we shouldn't treat input errors (other than the wrong number of arguments).
subject:
You can assume the string have no mistakes or extraneous characters. Negative
numbers, in input or output, will have one and only one leading '-'. The
result of the operation fits in an int.
But as you can see here, the tester is expecting a specific output from a case where an undefined behavior should be expected and the output totally ignored.
test trace:
----------------8<-------------[ START TEST
💻 TEST
./a.out "9828" ""234"
🔎 YOUR OUTPUT:
10062$
🗝 EXPECTED OUTPUT:
0$
----------------8<------------- END TEST ]
There is an extraneous '"' character in ./a.out "9828" ""234"
, therefore, this test should simply not exist.