3 ms·
It makes more sense when you're working with old legacy code and you want to add features to it. No!! Testing is not merely about future proofing (although i
by enjo 11y ago
It makes more sense when you're working with old legacy code and you want to add features to it.
No!!
Testing is not merely about future proofing (although it's a really nice benefit), it's about proving that your code actually works now. By writing tests and verifying that they pass you can be sure that the code actually does what you think it does. Furthermore you can ensure that when other parts of the code changes your code still does what you think it does, which might be an issue tomorrow, next week, or in ten years.
\* note: Testing does not prove that your code is correct, only that it satisfies the conditions of the test. As with all engineering testing is only effective as the person implementing it.
- JabavuAdams 11y agoUnit testing makes a lot of sense for game engine code, but less so for game-logic code, which tends to be highly volatile and specified only qualitatively.
- true_religion 11y agoA lot of bugs in games involve asking if state is X,Y,Z ... does A actually execute.