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 of benefits I see to doing it:




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




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




Would that be beneficial or just a nuisance?


Aucun commentaire:

Enregistrer un commentaire