mercredi 26 août 2020

test-input.txt in codility how to pass multiple values and expected vs actual?

I am trying to do the test on Codility (website for candidate testing). I need to write a function with one integer input one integer output. Codility has a testing mechanism where candidates would write in their values in test-input.txt and those values would be executed for the function candidates have written.

In test-input.txt if I add more than one value, I tried two integers with space and comma+space in between (A B or A, B) and I am getting errors. If I add a single integer value per line in test-input.txt test shows me

Your test case: [2]
Returned value: 2

So do I just add the test case inputs and then match them to outputs in my head, what do I do for functions with multiple inputs or something more complex, am I missing something obvious?

Aucun commentaire:

Enregistrer un commentaire