132
Developer vs Tester (media.mas.to)
submitted 3 months ago by yogthos@lemmy.ml to c/programmerhumor@lemmy.ml

you are viewing a single comment's thread
view the rest of the comments
[-] deadbeef79000@lemmy.nz 15 points 3 months ago* (last edited 3 months ago)

This is why it's important to have tests that assert a system's failure modes too.

shouldFitTriangleInTriangleHole()

shouldNotFitTriangleInAnyOtherHoles()

Bonus points for just parameterizing it.

[-] elvith@feddit.org 4 points 3 months ago
 assert triangleObject.shouldFitInHole(triangleHole) == true

assert triangleObject.shouldFitInHole(squareHole) == false
this post was submitted on 16 Sep 2024
132 points (95.2% liked)

Programmer Humor

32706 readers
1303 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS