Bug on Clash of Code?

Hi,

From time to time, I get something weird when trying the test cases in the Clash of Code challenge.
My output seems OK (when compared to the example) but the expected output is “nothing” and I don’t pass the test.
I can’t understand how the expected output could be “nothing”…

Cheers,

Hi,

You just ouput… too much !

Thanks for the answer but I now have 2 other questions:

  1. How outputing too much could change the expected result? If the expected result is “foo” and, as you said, I output too much, the expected result should still stay “foo”, right?
  2. When the expected result is “1 2 3 4” and is "1 2 3 4 " (with a trailing space) considered too much?

Thanks,

  1. Yes, but the console show the differences line per line (“Expected: Nothing” means you print too many lines)
  2. Yes, but in this case you’ll see:
    Found: "1 2 3 4 "
    Expected: “1 2 3 4”
  1. OK.

  2. That’s my problem. The console was displaying:
    Found: "1 2 3 4 "
    Expected: nothing

(I’ll take a screenshot next time that happens…)

Make sure there’s not an extra line being thrown in somewhere. If it expects one line and gets two, the second line will flag (expected nothing, got something).

I’ll double check next time…
Thanks for the suggestion.

Also don’t forget to end line after finishing output

what do you mean “to end line”.
I often have the same problem. it outputs 1 line only. The line in the console looks exacly as the expected value in the TC-List and the checker says: Expected nothing.