samedi 3 janvier 2015

Should you make tests for constants?

I'd like to know if there is any value in providing a test to say that a constant equals x in my test suite.


A couple benefits I see to doing it:



  • You know when this value has changed because the dev changing it will get a failed test

  • If the dev updating the constant updates the test with the new value, the test will confirm that it was rightfully updated


Would that be beneficial or just a nuisance?


Aucun commentaire:

Enregistrer un commentaire