samedi 31 octobre 2015

Should strings in automated unit tests still be hard-coded when providing internationalization support?

When writing a (C++) program with internationalization support I'm aware that strings should usually be stored in an external translation database rather than hard-coded. However, I'm wondering if it's still common practice to hard-code strings used in unit test code.

My intuition is that hard-coding strings in unit tests is ok as the effort to translate test code would be wasted on the end user. However, maybe there are situations where it would be useful, such as localization testing / development?

I'm wondering what the common practice is. Thanks.

Aucun commentaire:

Enregistrer un commentaire