You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the tournament exercise, one of my students took the team names from the instructions and hard-coded them in the source code. Despite this, his solution passed all the tests. I believe this is because in all of the "non-error" test cases, the team names are the same as in the instructions. To discourage this hard-coding of team names, I would suggest to either
add a non-error test case with different team names, or
to change (at least) one of the team names in one of the existing non-error test cases.
The text was updated successfully, but these errors were encountered:
Changing test cases is not allowed according to the spec, so (2) is not an option here.
Perhaps you could open a PR that adds such a case?
As a side note in case you're newish to Exercism: the tests on Exercism generally assume that the student is actually willing to learn and doesn't try to "cheat" the exercises, that's why a lot of exercises don't check for completeness and don't have guards against hardcoding solutions. You will encounter the same issue in many exercises.
Thanks for the side note - I understand. I guess it still makes sense to have test cases that reduce the chance that certain poor coding practices happen. But maybe "hardcoding test data" is something the automatic code analysers could catch (sometime in the future)?
For the tournament exercise, one of my students took the team names from the instructions and hard-coded them in the source code. Despite this, his solution passed all the tests. I believe this is because in all of the "non-error" test cases, the team names are the same as in the instructions. To discourage this hard-coding of team names, I would suggest to either
The text was updated successfully, but these errors were encountered: