Elektrine lite

← Feed

@TomF@mastodon.gamedev.place

Post #2859609

2026-04-03 18:41 UTC

@sol_hsa@mastodon.gamedev.place @ocornut@mastodon.gamedev.place Unit tests just seem like more code to maintain, and more friction to overcome for changes, without doing anything interesting in return.

Replies (4)

  • @TomF@mastodon.gamedev.place @ocornut@mastodon.gamedev.place I'm pretty sure they don't fit every project out there. I usually don't bother with them in my hobby projects.. but if I'm implementing something "to the spec", I find them useful. (The "spec" may be just inside my head, nothing official)

    Open ##2859610

  • @pkhuong@discuss.systems 2026-04-03 22:17

    @TomF@mastodon.gamedev.place @sol_hsa@mastodon.gamedev.place @ocornut@mastodon.gamedev.place you can delete unit tests when they become irrelevant. unless i have clear properties, I see them more as automatically invalidated documentation of what happens for a small set of inputs.

    Open ##2859612

  • @TomF@mastodon.gamedev.place @sol_hsa@mastodon.gamedev.place @ocornut@mastodon.gamedev.place I use unit tests as a “don’t mess with my code” constraint. Or documenting edge cases that the code must get right. Or as a form of regression testing. Or all three at the same time.

    Open ##2859613

  • @aeva@mastodon.gamedev.place 2026-04-04 00:46

    @TomF@mastodon.gamedev.place @sol_hsa@mastodon.gamedev.place @ocornut@mastodon.gamedev.place imo the sentiment divide for unit tests is pretty neatly explained by them being mostly redundant to having a proper type system

    Open ##2859614