this post was submitted on 03 Jul 2023
501 points (97.9% liked)

Programmer Humor

24709 readers
343 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] average650@lemmy.world 29 points 2 years ago (4 children)

Why not just test all even numbers greater than 2? It covers infinite numbers and passes 100% of the time.

[–] kogasa@programming.dev 26 points 2 years ago (3 children)

It's important to test edge cases.

[–] two_wheel2@lemm.ee 2 points 2 years ago (2 children)

We'll grab those in integration and E2E tests.. let's just stick with even numbers such that 2 < n < 1002... that's 1000 cases, more than enough, and 100% test coverage

[–] AVeryCleverName@lemmy.one 3 points 2 years ago (1 children)
[–] two_wheel2@lemm.ee 3 points 2 years ago

Well shit. No more lemmy while drunk