this post was submitted on 09 Feb 2024
858 points (97.6% liked)

Programmer Humor

19564 readers
861 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] frezik@midwest.social 17 points 9 months ago (1 children)

No, you can't assume that. The probability of hitting the condition each time is low. If there aren't very many calls that hit this, it could easily slip through. Especially on 64-bit int platforms.

[–] sunbeam60@lemmy.one 1 points 9 months ago

Yes agree if you’re talking about unit tests. I’m thinking smoke tests, which is are the most common automated tests in games, where I’ve spent most of professional career. The amount of booleans checks that happen in a single frame I doubt the game wouldn’t crash within the first couple seconds.